You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
If you want to set default value for "Comment Viewable By" globally, here is steps :
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
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