Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Restricting Comment Visbilty by only GROUPS

Kapil Bolli
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

Hello ,

For Comment Visibility JIRA has two options,restricting by 1) ProjectRoles only. 2)Gruops& Project roles.

I have defined many project roles in JIRA like developer,supporter etc.

but I want to restrict comments using groups like Internal & External only,so under comments>>viewable by ,there should be only these two options.

Can there be a workaround to make comment visiblity using only Groups?

Thanks & Regards

Kapil

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Kapil Bolli
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2012

Hello Naren,

I have got the solution ,to have only groups under CommentVisiblity you need to just remove this line

#set ($isRolePresent = $roleLevels && !$roleLevels.isEmpty())

from

“C:\Program Files\Atlassian\JIRA 4.3\atlassian-jira\WEB-INF\classes\templates\jira\issue\field\comment-edit.vm”

Regards

Kapil



1 vote
MinC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

Referring to the General Configuration documentation, you will only be able to set either Project Roles or Groups & Project Roles for the comment visibility options. There is no option for groups only. You may probably need to do some source codes modification to customise it if you wish to have only groups.

Kapil Bolli
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

Hi Min,

Thanks for explaining, can you help me for doing workaround as changes in which file etc?

0 votes
Joey McDaniel May 22, 2013

I'm also trying to hide a specific Project Role for showing in the drop down for comments. Editing the global.vm seems to be the way to go, but I don't understand how to single out that Project Role from showing.

This is the code that controls the drop-down options:

#if ($isRolePresent)
<optgroup label="$i18n.getText('common.words.project.roles')">
#foreach ($level in $roleLevels)
<option value="role:${level.id}" #if($level.id && $selected == "role:${level.id.toString()}")selected="selected"#end>$textutils.htmlEncode($level.name)</option>
#end
</optgroup>
#end

I'm hoping to modify this to hide on specific group, something like this:

#if ($isRolePresent && !ProjectRole == "Name of Project Role To be Hidden")
<optgroup label="$i18n.getText('common.words.project.roles')">
#foreach ($level in $roleLevels)
<option value="role:${level.id}" #if($level.id && $selected == "role:${level.id.toString()}")selected="selected"#end>$textutils.htmlEncode($level.name)</option>
#end
</optgroup>
#end

But of course that logic doesn't work. Any suggestions?

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

atlassian-jira\WEB-INF\classes\templates\jira\issue\field\comment-edit.vm can be modified to put in specific restrictions. The macro createLevelSelect is btw is in atlassian-jira\WEB-INF\classes\templates\jira\global.vm.

Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 28, 2011

Hi,

I've huge number groups in Jira. out of which I want to see only 2 groups, say, 'Confidential' and 'All' under the 'Viewable by All Users' tab when I add a comment and select the groups.

Also how can I remove the by default present option 'All Users' and the option 'jira-users' under the Viewable by All Users tab.

I am not familiar with the Velocity Template. Can you please tell me what do I need to change in order to see only the caption Group and my two groups 'Confidential' and 'All' under it in Viewable by All Users tab.

Thanks In Advance.

Naren

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events