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 Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

4,698 views 20 14
View question

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