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

default viewable by when commenting

TothJ
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.
July 4, 2011

In Jira when you comment an issue you can choose who can view that comment (viewable by). Its All users by default. In one project ('THATPROJECT') I'd like to set the default to a specific group ('thatgroup'). In Jira 3.9 I achived this by editing the comment-edit.vm like this:

<option value="group:${textutils.htmlEncode($level)}"
##if ($level && $selected == "group:${level}")selected#end
#if (($commentLevel && $level && $commentLevel == $level) || (!$commentLevel && ($issue.project.key == "THATPROJECT") && $level == "thatgroup"))selected#end

>$textutils.htmlEncode($level)</option>

We plan to move to 4.4, so I started to play with rc1, I see comment-edit.vm changed a lot ( I guess in 4.3 its the same).

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
TothJ
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.
July 5, 2011

the macro moved to global.vm - you can do the exact same thing there in 4.4.

#if ($issue.project.key == "THATPROJECT")
#set($currentSelection = "thatgroup")
#end

0 votes
Dieter
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.
December 8, 2011
I think this can be done less intrusive with the Behaviours plugin: https://studio.plugins.atlassian.com/wiki/display/JBHV/Miscellaneous+Behaviours+Examples#MiscellaneousBehavioursExamples-Setcommentvisibilitylevel It should also be possible by using some Javascript in the comment fields description to set the selected option of the field commentLevel.
Dieter
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.
December 8, 2011
There is an jS example how you can set a predefined value in a select list at http://stackoverflow.com/questions/149573/check-if-option-is-selected-with-jquery-if-not-select-a-default
0 votes
Zahir MOUHOUBI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 8, 2011

Hello,

I am a begginer in velocity and I have the same problem.

I want to display by default the value "nobody" for all the issues.

I create a groub with no user called nobody, and i want to display it for all the issues.

Please help me.

0 votes
Deleted user July 11, 2011

I have same problem too and I couldn't understand your guide. Please explain it more.

TothJ
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.
July 22, 2011

there is a VM file under web-inf/classes/templates/jira, global.vm. I edited this :

#set($currentSelection = "$i18n.getText('security.level.viewable.by.all')")
#if ($issue.project.key == "TST")
#set($currentSelection = "jira-developers")
#end

sorry I didnt see your question, yell if you need more explanation.

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