how to reopen an issue if a link is added

Elifcan Cakmak
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.
April 19, 2017

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

0 votes
Randy
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.
April 20, 2017

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

Elifcan Cakmak
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.
April 20, 2017

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 :) 

Elifcan Cakmak
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.
April 21, 2017

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