Automatically close subtask if another w/ the same Issuetype is open?

Anyone know if this can be done, or can point me to a script that does something similar and I can try and figure it out?

I am using Exocet to sync fields to a parent ticket, and certain subtasks will be created using ImpEx (Excel Import).  If this has already been done for an issue is there a way I can have the initial ticket closed and keep the new one?

Also going to test if Exocet can ignore all but the latest issue and that's it, meaning this might not be necessary, but exploring my options.

1 answer

1 accepted

0 votes
Accepted answer
Gaston Valente Community Champion Jan 24, 2017

Hi, i think that this can be done with a post function or a listener to catch the new issue creation, after this event is captured, you need to:

  1. get the parent issue
  2. loop the subtasks of the parent issue
    1. if another subtasks exists with the same issuetype and has different issue key you can perform the action on this issue

this can be easily done with groovy (scriptrunner) or sil (jjupin)

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 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...

5,694 views 22 17
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