Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: set security level to sec. level of assigned member

Susann Petzold
Contributor
October 28, 2021

Hi all, 

I am pretty (8 days :D) new to Jira and I would like to create an automation, to change a security level. 

So if a C level-member starts a project with e.g security level 6 and assignes a sub task to a head of department(lvl 4), the subtask should have security level 4, and not 6 as before. 

So I need something like: 

If sec. level of the assigned people is lower than my own, set sub taks security level to the security level of the assigned person.


Is it possible with an automation, an add on, or anything else? 

Many thanks in advance for your help!

 

 

 

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
October 28, 2021

There's a few problems with this idea, and actually, Jira doesn't work this way at all.

Each security level for an issue is actually a rule that says who can see the issues with that level on it.

This means you can do things like:

  • Top Secret: Only the user called Bob can see these
  • Secret Squirrel:  People in the role of Squirrel in the project can see these
  • 007: Only people in the group called Bond can see these

Obviously, you can see that Bob will match Top Secret, but he might not be a Squirrel or in the Bond group

So, there's a string of problems with what you're trying to do!

The first one is fixable.  Whilst you could of course set your level names to 1, 2, 3, 4 etc, there isn't really a layer implementation to them.  Just because your C-level person matches the rule for 6, doesn't mean they match the rule for 4 automatically.  In my example, if you wanted "Top Secret" to include the other levels, you'd need to say "Secret Squirrel: role Squirrel and Bob can see these" and "007: group Bond and Bob can see these"

Second is also something to be aware of - a person cannot set a security level of which they are not a member, except when they are creating an issue (which then looks odd, because they get a "issue created, but you can't see it" warning immediately)

And the third one is the kicker.  Sub-tasks don't have security levels.  A sub-task in Jira is a part of its parent, and one of the things it takes from being part of it is the security level.

So, in short, you simply can't do this.  You can set different security levels at the issue level, but not sub-tasks.

You can get part-way there - if you use a dynamic role in a security level, then you can hide sub-tasks, but it's not a cascade (on the bright side, you don't need automations to do it) - dynamic roles are things like "reporter" and "assignee".  So you can make a sub-task visible to its assignee by assigning it to them.  But they'll still need to be part of the security level for the parent before they'd be able to see the sub-task.

Susann Petzold
Contributor
October 28, 2021

Many thanks for your comprehensive reply! I will check out the dynamic roles, and will see how it works for me :) 

0 votes
Vahagn Beglaryan October 28, 2021

you can use Jira Automation Plugin.

 

You should set up several if/else JQL filters, and trigger should be when issue assigned, and action edit issue fields(in this case security level)

Vahagn Beglaryan October 28, 2021

for example you have 10 level of security (each one for specific group of users), you should set 10 if else conditions, and 10 actions for editing security level

 

When issues will be assigned to John Smith, which is member of security level 1, the corresponding if/else component should works and set issues security to level 1

Suggest an answer

Log in or Sign up to answer