how to reopen an issue if a link is added

Hello

Our need is that when we link an issue to a closed one, we want the closed issue to be reopened. 

I tried to do this with adding a custom script to the transition however even if I add the script after "Re-index an issue to keep indexes in sync with the database." step, it did not work.

Also another solution I tried was adding a "Link Date" and compare it with the resolution date but I don't think it is possible to compare different custom fields of different issues.

Any ideas would be appreciated.

Thanks!

1 answer

To keep it simple:

  1. Add a workflow transition from Closed -> reopened status's with a specific name like "reopen on link",
  2. Add a SR listener that Triggers the "reopen on link" transition whenever a link is added to an issue. 

Ff it's not in a closed state, the transition wont be valid so it'll just fail and not do anything.  Closed issues will reopen

Hello

Thanks for your answer.

My question is that, wouldn't the listener open all the issues that are closed and have links? How will I differentiate the ones that are linked after it was closed? 

I thought about this issue a lot so I can be missing very obvious points here, sorry for that if so :) 

Hello

I did some research and understood how the listeners work now so you can ignore my first question. Thanks for the advice. Can I ask, is there an event for link issues? Because as I can see there is not. I found this question: 

https://community.atlassian.com/t5/Answers-Developer-Questions/Is-there-any-Issue-Link-Event-In-Jira/qaq-p/489167

Looking forward to your answer. Thanks again.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday 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...

4,680 views 20 14
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