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 vote
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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published 6 hours ago in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

252 views 4 4
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