How to set the issue permisions according to reporter group?

Alex Olkhovyk January 26, 2014

I need to make every new issue available to the reporter's group (or groups) members only.

I.e. I want Jira to do following actions on new issue creation event:

1) determine the list of users groups which the reporter belongs to;

2) grant the issue read&write rights to the members of groups in the list and deny access to the issue to all others.

How can I do so?

Thanks a lot.

3 answers

0 votes
Alex Olkhovyk January 27, 2014

Thanks, buddy, for advice.

I've found some useful code here: https://answers.atlassian.com/questions/173832/issue-security-based-on-group-level

But I need this process to be dynamic, i.e. something like that (abstract syntax):

AllowedGroupList = [List of groups issue.getReporterId() is in]
[Set issue access list to NONE - remove all permissions]
i = 1
while  (i <= AllowedGroupList.Count) {
       [Add group AllowedGroupList.Item(i) to issue access list];
       i++;
}

Could somebody please convert the "code" above into working skript?

Thanks in advance.

0 votes
Alex Olkhovyk January 27, 2014

Thanks, buddy, for advice.

I've found some useful code here: https://answers.atlassian.com/questions/173832/issue-security-based-on-group-level

But I need this process to be dynamic, i.e. something like that (abstract syntax):

AllowedGroupList = <List of groups issue.getReporterId() is in>
<Set issue access list to NONE - remove all permissions>
i = 1
while  (i <= AllowedGroupList.Count) {
       <Add group AllowedGroupList.Item(i) to issue access list>;
       i++;
}

Could somebody please convert the "code" above into working skript?

Thanks in advance.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2014

I've not got any code for you, but I do have a warning - you'll need to exclude some groups from this routine. The default setup for example, has a setting that "you can only log in if you belong to the jira users group". So unless you drop that group out in your code, you will find that everyone can see everything...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events