our epics have open and closed status. we link the issues to the epic but we would want to make a condition so issues could not be linked to epics that are in the closed status.
any ideas to pull this off?
Hi Jon!
Unfortunately, there is no way to achieve this on-the-fly.
Please take a look into this community post.
The JMWE addon (Jira Misc Workflow Extensions) allows you to add a workflow validator which will do this, called "Linked Issues Status Validator". They will still be able to select a closed Epic, however when they try to create the issue it will error saying the Epic is closed, and they will have to choose another.
Hope this helps.
Best Regards.
@Jondo you mean the "closed" workflow status or the "closed" epic status?
The important status is the epic status. Closed epics are filtered from the "epic link" list by default. See this comment on how to close an epic.
However, users would still be able to see closed epics in the "epic link" list by clicking the "show done epics" checkbox and then they would also be able to associate an issue with done epics.
Kind regards,David
hi david, if I understand correctly its would be an epic that is in a status we made named closed (and actually this closed status we made is still worked one but we call it closed nonetheless) . (not a jira system closed). I can close the epic no problem but what we are trying to do is prevent the normal issues from being linked to the epics that are in the closed status.
Hi Jon,
okay, I understand, so you have a closed workflow status.
Well unfortunately there is no way to completely prevent linking issues to closed epics (not even with closed epic status).
All you can do is by default filter closed epics (closed epic status) from the "epic link" list as I commented above. But it seems that's not what you are looking for.
Unfortunately I also don't know of any plugin that could help you with your requirement.
I don't know if this is an option for you but there seems to be a possibility to do what you are looking for using ScriptRunner for Jira (non-free Jira plugin).
I haven't tried this myself but this is what a support employee of ScriptRunner's vendor told me (just replace Done with the name of the desired status):
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".
It looks like you're new here. Sign in or register to get started.