Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,559,491
Community Members
 
Community Events
184
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
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 04, 2021 • edited

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

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 05, 2021

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
AUG Leaders

Atlassian Community Events