Set issue security level based on user's group

Adrien September 16, 2020

Hello,

I would like to automatically set the Security Level of a newly created Issue based on groups my user is part of.

For example, let's say we have those users :
user : user1
groups : customer1, (...)

user : user2
groups : customer1, (...)

user: user3
groups : customer2, (...)


When user1 or user2 creates an issue, I would like it to be automatically set to "customer1" security group, so "user3" can't access it. We are using 1 Project to store all these issues from various customers.

I've got the permission part working, but not the automation part.

The group always starts with "customer-" and we add/remove new users/groups periodically. Is there a way to assign the security group of an issue based on groups starting with "customer-" that my user is part of?

Any new ideas on how to do it differently would be also greaty appreciated.
Thank you.

2 answers

1 vote
Jorden Van Bogaert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2020

Hi @Adrien 

I think you'll need an add-on for this. We personally like ScriptRunner very much as it is very flexible, however it requires a little bit of coding skills.

There are probably other add-ons which can set the security level for you via a post function, but by default there's no built-in feature that can do this.

Kind regards
Jorden

0 votes
Sanmat Jhanjhari September 16, 2020

Hi,

With Automation for JIRA you can trigger the Rule on Issue Created -> Conditions (user in group) -> Assign Issue.

 

Regards,

Sanmat

Adrien September 16, 2020

Hello Sanmat,

Unfortunately, when trying Automation for JIRA, it only allows me to select one specific group to be added as default to all issues created in a specific project.
Maybe I'm missing something? 

I've been using this documentation, but it doesn't seem to help my case.
https://confluence.atlassian.com/jirakb/how-to-set-the-security-level-of-an-issue-based-on-group-membership-726565612.html

In my case (that's something I didn't shared so I'll edit my question) : we've only got one main project, where various users & groups centralize their issues. We are trying to compartmentalize it, so users of the same group only see which issues from the group they are part of (customer-XXX).

This method seems to work fine for "in 1 Project => set 1 default Security Group for all issues", but not "in 1 Project => set the Security Groups of an Issue based on its user group".


Thank you for your time and answer. :)

C_ Derek Fields
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2020

You would need to create multiple actions, 1 for each customer group, and then have a condition that only executes the action if the user is in the that customer group. You can't do this from a single automation action.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
812002
TAGS
AUG Leaders

Atlassian Community Events