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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,875
Community Members
 
Community Events
184
Community Groups

Default value for "Comment Viewable By"

If you want to set default value for "Comment Viewable By" globally, here is steps : 

[ Default Group ]

1. Decide the group, e.g. jira-developers

2. Replace following code in the file atlassian-jira/WEB-INF/classes/templates/plugin/comment/system-comment-field-edit.vm


#if (!$comment && $defaultLevelEnabled)
#set ($selectedCommentLevel = "default")
#foreach ($level in $groupLevels)
#if ($level == 'jira-developers')
#set ($selectedCommentLevel = "group:jira-developers")
#end
#end
#else
#set ($selectedCommentLevel = "")
#end

instead of 

#if (!$comment && $defaultLevelEnabled)
#set ($selectedCommentLevel = "default")
#else
#set ($selectedCommentLevel = "")
#end

3. Replace following code in the file atlassian-jira/WEB-INF/classes/templates/jira/global.vm

#if ($isRolePresent)
#foreach ($level in $roleLevels)
#if($level.id && $selected == "role:${level.id.toString()}")
#set($currentSelection = "$i18n.getText('viewissue.comment.visibleby') <span class=redText>$level.name</span>")
#set($locked = true)
#end
#end
#end
#if ($isGroupPresent)
#foreach ($level in $groupLevels)
#if($level && $selected == "group:${level}")
#set($currentSelection = "$i18n.getText('viewissue.comment.visibleby') <span class=redText>$level</span>")
#set($locked = true)
#end
#end
#end

instead of

#if ($isRolePresent)
#foreach ($level in $roleLevels)
#if($level.id && $selected == "role:${level.id.toString()}")
#set($currentSelection = "$i18n.getText('security.level.restricted.to', ${textutils.htmlEncode($level.name)})")
#set($locked = true)
#end
#end
#end
#if ($isGroupPresent)
#foreach ($level in $groupLevels)
#if($level && $selected == "group:${level}")
#set($currentSelection = "$i18n.getText('security.level.restricted.to', ${textutils.htmlEncode($level)})")
#set($locked = true)
#end
#end
#end

4. Restart your JIRA application

[ Default Role ]

1. find project role id in [JIRA Administration] -> [System] -> [Project roles], e.g. Developers is 10001

2. Replace following code in the file atlassian-jira/WEB-INF/classes/templates/plugin/comment/system-comment-field-edit.vm


#if (!$comment && $defaultLevelEnabled)
#set ($selectedCommentLevel = "default")
#foreach ($level in $roleLevels)
#if ($level.id == 10001)
#set ($selectedCommentLevel = "role:10001")
#end
#end
#else
#set ($selectedCommentLevel = "")
#end

instead of 

#if (!$comment && $defaultLevelEnabled)
#set ($selectedCommentLevel = "default")
#else
#set ($selectedCommentLevel = "")
#end

3. Replace following code in the file atlassian-jira/WEB-INF/classes/templates/jira/global.vm

#if ($isRolePresent)
#foreach ($level in $roleLevels)
#if($level.id && $selected == "role:${level.id.toString()}")
#set($currentSelection = "$i18n.getText('viewissue.comment.visibleby') <span class=redText>$level.name</span>")
#set($locked = true)
#end
#end
#end
#if ($isGroupPresent)
#foreach ($level in $groupLevels)
#if($level && $selected == "group:${level}")
#set($currentSelection = "$i18n.getText('viewissue.comment.visibleby') <span class=redText>$level</span>")
#set($locked = true)
#end
#end
#end

instead of

#if ($isRolePresent)
#foreach ($level in $roleLevels)
#if($level.id && $selected == "role:${level.id.toString()}")
#set($currentSelection = "$i18n.getText('security.level.restricted.to', ${textutils.htmlEncode($level.name)})")
#set($locked = true)
#end
#end
#end
#if ($isGroupPresent)
#foreach ($level in $groupLevels)
#if($level && $selected == "group:${level}")
#set($currentSelection = "$i18n.getText('security.level.restricted.to', ${textutils.htmlEncode($level)})")
#set($locked = true)
#end
#end
#end

4. Restart your JIRA application

 

Reference Robert Wolf's comment in https://jira.atlassian.com/browse/JRASERVER-9091 

0 comments

Comment

Log in or Sign up to comment