Hello all,
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?
Thank you!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.