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

This widget could not be displayed.
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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

206 views 1 3
Join discussion

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