Forums

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

Automation for Jira: change security level for an issue based on other field value

Deleted user February 15, 2021

Hi,

I'm trying to set automation rule that will change the security level for a Jira issue based on a value set for other fields in the issue.

To be specific, I have 2 custom fields, email and username, and if any of the field is populated, on creation or edit, I need the automation rule to set the security level for that issue to be visible only for project members with role Administrator and Members. I've added Everyone under a custom role with custom restriction and I don't want them to see those fields when are populated. Everything works fine when I manually change the restrictions for each issue individually, but I want to automate this. FYI I'm working on a next-gen project. 

I've set the atlassian-addons-project-access role with permissions to set security levels. The automation is run by me, I'm admin for the project, and creator of the automation rule. The conditions for the rule are set, and I tried various JSON options to change the security value, but with no success. 

When debugging, I've tried basic option, to edit the Security level with the Edit issue action and let the filed be cleared, to remove security restrictions for manually restricted issues, but got this error:

Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored -Security Level (security) 

The Security Level filed is available for the permission screen. If anyone has faced with similar issues, any advice would be much appreciated. Thank you.

Kind regards,

Biljana

1 answer

0 votes
Velizar Borisov
Community Champion
February 17, 2021

Hi Bilijana!

Just try to update the "Security level" field instead of running a JSON.

 

sl.PNG

Deleted user February 17, 2021

Hi Velizar,

Thank you for your reply. I assumed it was something simple, but unfortunately under security levels in my automation rule I don't see the roles, only the Copy from options:

Copy-from-security.JPGI tried the option with leaving the Security Level empty, so the automation rule clears any manually set restriction, it didn't work, got error that I don't have access to the security filed, even though when I change it manually, on any issue, it works.

Any suggestion on what I'm missing, probably some setting, would be much appreciated. Thank you.

Kind regards,

Biljana 

Velizar Borisov
Community Champion
February 18, 2021

Hi again,

In a standard Jira project you'll have an additional permission for setting the security level and a separated Issue security scheme, which is responsible for the values in the Security level field. Unfortunately, both of those settings are not available in the lightweighted next-gen projects. Furthermore, there's a request on making the Security level applicable in them. Check this request for more info.

If you desperately need the option to set up the Issue security I would recommend you to switch the project type to a standard one. There you'll have the option ot customize everything you need.

Deleted user February 18, 2021

Hi Velizar,

Thank you for replying. I did some research today and figured out that the security level is available only for classic projects, tested it and it works as expected (it took me some time to figure out how Issue security scheme works, but when implemented, automation rule was changing the security level for an issue).

I voted on the request, even though it doesn't seem that it will be implemented soon. What is confusing is that you can actually limit issue visibility to certain users on next-gen using the Restrict option, but 'Restrict to' field is not available for automation rules.

Thank you for suggesting to use classic project. Since all our projects are next-gen, I need this for existing next-gen project. Thank you for confirming that it is not available for next-get, I thought I was misconfiguring something. And thank you for taking the time to reply on my question. 

Kind regards,

Biljana

tony wong January 19, 2022

HI Velizar

I'm running JIRA standalone versions, and not using JIRA cloud. Do you know if this function operation exist on standalone. I'm running into the same problem as the person above. In this version, i'm not getting any option when "Edit Issue Field" to set the operation either to (Set Value... or Copy From..)

 

Thoughts?

Marc - Devoteam
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.
June 8, 2023

Hi @tony wong

Have you checked that your Issue Security Scheme is set on the relevant project or projects?

That's the issue I encountered.

Associating the scheme with the project gave me the options as described by @Velizar Borisov 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events