Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,060
Community Members
 
Community Events
165
Community Groups

Bulk change Security Level

I need to set Security Level for over 100,000 issues. Bulk change 1000 at a time or Jira Automation constantly timing out are both terrible. It seems like I ought to be able to run larger batches via Jira CLI, but I can't get it to recognize the Security Level field by name or id (security).

Some commands I've tried (also variations with and without single and double quotes):

acli --action runFromIssueList --jql "project = CAPS AND 'Localization Help' is EMPTY" --common "--action setFieldValue --issue @issue@ --field security --value 10602"
acli --action runFromIssueList --jql "project = CAPS AND 'Localization Help' is EMPTY" --common "--action setFieldValue --issue @issue@ --field 'Security Level' --value Internal" 

 I always get an error that the custom field "is not defined or not valid in this context." I think this might be because I'm on Jira 8.22 and Security Level is a system field? Anyone know how to get this to work?

2 answers

2 accepted

1 vote
Answer accepted

I have not checked this recently, but I wanted to get you an answer as fast as possible!

Last time I tried to set the Security level over REST, the field name/id was "level", not security or security-level - could you give that a quick shot?

The other thing to look at is if the account posting the security level is a part of it - only users in a level can apply it to an issue.

Hi @Jennifer D_ Smith @Nic Brough _Adaptavist_

I just had a look at our REST calls and I believe the field name is indeed security. However, the value is passed as "{ "id": "<id-value>" }, see below:

Screen Shot 2022-05-04 at 2.15.21 pm.pngPerhaps that is needed in the CLI, too? 

Like Jennifer D_ Smith likes this

Thanks for looking that up for us!

The id would make sense - the REST call expects the id of the security level, not the name!

Thanks to some hints I got from the API info from Nick and Hannes, this is the working Jira CLI call:

acli --action runFromIssueList --jql "project = CAPS AND 'Localization Help' is EMPTY" --common "--action setFieldValue --issue @issue@ --field security --value Internal --suppressNotify" --continue

 

Important: make sure that your CLI user's permissions are correct and also that the field is on the edit screen for the issue types that you are looking to change. 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you