JIRA Script Runner Question

Hello - 

I have a question wondering if it is possible to create a specific Groovy script in the Script Runner plugin. To give an idea of my question, here is the context of the project - 
I have two different Issue Types. They are Potential Candidate and Open Position. Potential Candidate and Open Position each have their own workflow. I have five Potential Candidate Issues linked to one Open Position Issue. I have already successfully created a rule in which when one Potential Candidate reaches the end of its workflow, the Open Position Issue automatically transitions to Done. That works well. 
What I now want to happen is with the four Potential Candidates I have left on the workflow. I want to be able to create a script that will automatically link them to the next Open Position, or an Open Position that I choose. 
Is it possible to create a script that automatically links the four candidates to a new Open Position? Or a script that allows me to choose an Open Position that my four candidates will automatically link to? Does anyone know if this is at all possible? Any help/insight would be much appreciated. Thanks. 

1 answer

0 votes
Steven Behnke Community Champion Jun 28, 2017

Off hand, I'd assume you can use a Script Runner Select List Conversion to create an issuepicker. https://scriptrunner.adaptavist.com/5.0.3/jira/behaviours-conversions.html

Then, you should include this on a screen attached to the Done transition. Finally, you can execute a postfunction that occurs after the issue is indexed. This postfunction should use IssueLinkService to add/delete links as neccesary for your business logic.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

381 views 1 13
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot