Good Friday good People :)
I've created a Custom Field (with good help from the people at this forum ;) ), called Reporter Group, and that field is automatically filled out by Reporters User Group when an issue is created.
I ran into some issues to begin with, cause some users are in more than one group but got a solution to that. The reason for me doing this, is because I wanted to be able to see in a pie chart what group is reporting most / fewest defects.
I've put the script below so you can see how above mentioned it's done... BUT... now I'm wondering if I can change the script to set the Reporter Group field by an IssueType, for certain User Groups. For an example if a user is in two groups that I don't want to ignore, then the issuetype sets the field.
Fx. If I'm a reporter in two groups, one called jira-techsupport and another called jira-servicesupport, and if I report an issutype called techsupport, the reporter group is filled out as jira-techsupport, but if I report a regular bug (or something else than techsupport issue) the reporter group is filled out as jira-servicesupport, and this only applies if user is in those two groups, not he's in 'jira-qa' group etc.
Here is the script I'm using now, and works well, but would like to add the issuetype as mentioned above to it.
GroupManager groupManager = ComponentManager.getComponentInstanceOfType(GroupManager.class)
GroupList = groupManager.getGroupsForUser(issue.getReporterId()).name;
ignoredGroups = ['jira-users', 'jira-administrators'];
resultGroups = GroupList - ignoredGroups;
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG