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,527
Community Members
 
Community Events
165
Community Groups

ScriptRunner - Need to bulk change / automate change of priority value of linked issues

Hi:

I'm new to ScriptRunner but we have a user who has given us an interesting scenario with which we cannot find a solution.

He needs to take all of the issues that are linked to a Project (CoE Reporting) and then any priorities that are Not Prioritized need to be changed to a P2 Priority.

After some research we found the following script to use in ScriptRunner (does not work in Atlassian standard JQL query):
issueFunction in linkedIssuesOf(Project ="CoE Reporting") AND priority = "Not Prioritized"

We get the results below:

JQL Linked Issues.jpg

Now we just need to change the Priority of these results into a P2 via automation and/or bulk change.

When attempting to use Jira automation it kicks it back as invalid.
When attempting to use standard issue filtering for bulk changing it kicks back the JQL as invalid

JQL Linked Issues-automation error.jpg

 

When looking at the Adaptavist library I got this possible solution to "Bulk Update the Value of a System Field on Jira Issues" but when I tried to use the script in the code on the automation it, too, returns errors because the script is apparently for Jira server, not cloud, but when I click on the link to learn more, I get a 404 error "page not found":
jira script import error server.jpg

 

I found this article on Bulk updating a CUSTOM field but not a system field. And it, too, looks to be for Server, not Cloud.

Is there a script that I can use to bulk change priorities in ScriptRunner, or is there some standard JQL alternatives to issueFunction and linkedIssuesOf?

2 answers

1 accepted

0 votes
Answer accepted

Hi Gregory,

I can confirm that you are correct that you cannot use the issueFunction keyword in regular JQL search boxes directly such as on the automation screen.

However, I can confirm you can reference the saved search from the enhanced search page by calling its filter in order to use the issues returned by it in places such as Agile boards or automation rules and I can confirm we have a knowledge base article located here which explains this.

Finally, I can confirm the page the link you mentioned should link to is the page located here.

I hope this information helps.

Regards,

Kristian

Hi Gregory,

I can confirm that we have now fixed the broken link on the Invalid imports popup and we thank you for bringing this to our attention and apologise for any inconvenience that this caused.

Regards,

Kristian

Like Gregory S Williams likes this

Thank you for the useful information.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

207 views 1 4
Read article

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