I'd like to prevent linking issues to epics that are closed (Epics in status Done for example).
I saw in another post that it is probably possible using a ScriptRunner behavior:
It is possible to define a behaviour which you can attach to the Epic Link field. This behaviour code can look up the status of the selected issue, and if the status is Done then setError on the Epic Link field which would then prevent the user submitting the issue until they choose a different Epic.
The Epic Link field returns a String value like this: "key:SSPA-30" which you can then remove the word "key:" from and use the remaining string with the issueManager.getIssueByCurrentKey(String key) method to get the issue object. Then you can get the status.name from that issue object to check if it equals "Done".
Could someone familiar with ScriptRunner behaviors help?
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events