I need to achieve that in issue comments, based on user group, for an example if comment user is in group developers show in comment header some text/icon near user display name. In this case text shows [DEV] - which indicates that user is developer.
As i understand that place which renders the comment header is in file:
$JIRA-HOME/WEB-INF/classes/templates/plugins/jira/macros.vm
near at
$i18n.getText('issue.tabpanels.comment.action.header', $userformat.formatUserkey($authorKey, 'profileLinkActionHeader', "commentauthor_${comment.id}_$!{suffix}"), $createdDate) #if($visibilityLevel) - $visibilityLevel #end #if($updateInfo) - <span class="redText subText" title="$updateInfo">$i18n.getText('common.concepts.edited')</span> #end
I tried to add a simple user lookup in groups using $jiraUserUtils or $groupManager helper class methods and shows some text based on group:
#if($groupManager.getGroupNamesForUser($author).contains("developers"))
<span>[DEV]</span>
#end
or
#if ($jiraUserUtils.getGroupNamesForUser($author).contains("developers"))
<span>[DEV]</span>
#end
But it seems that in this template $jiraUserUtils, $groupManager helper class not available in the context.
Any ideas how to get work it here?
The main idea is to show that comment owner/updater is internal developer not external requester.
Something like that:
ENV: JIRA: 7.x
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.