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 vote
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
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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

86 views 0 5
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