JIRA Script Runner Question

perdue_brandon_vast-inc_com June 28, 2017

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 F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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
TAGS
AUG Leaders

Atlassian Community Events