Is there any way to prevent assigning a closed epic when editing an issue?
I know there is an option to show/hide closed epics, but users has the choice to select them. Is there no way to deny this option?
Thanks
Hi @Arkaitz Bastida,
Could you disable editing to closed Issue on Workflow properties?
https://confluence.atlassian.com/adminjiraserver073/workflow-properties-861253674.html
Thanks @Ollie Guan,
The thing is that the issues are open; some epics are closed. So I don't want to show them in the "epic link" list, not to allow the user to add new issues to epics that have been closed.
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.
Add-on is here: https://marketplace.atlassian.com/apps/292/jira-misc-workflow-extensions
Thanks @Pete Singleton, I'm gonna try this add-on.
I have used the following SQL in Condition ScriptRunner condition when closing the issue:
issueFunction in issuesInEpics("'Epic Status' = 'In progress' OR 'Epic Link' is EMPTY")
And finally it worked!
@Arkaitz Bastida Hello. I am looking for a solution to the same problem. Can you please help me with the steps of how you added this condition. Simply adding this line to a Scriptrunner Condition shows error Thank you
Hello @Ollie Guan ,
unfortunately, setting the jira.issue.editable to false for the Epic's Done status does not prevent you from associating issues with closed Epics.
jira.issue.editable
Kind regards,David
Hi @Arkaitz Bastidaand team,
Please find below a solution applicable to Cloud Jira (Premium or Enterprise, as long as you got access to Automations) which doesn't rely on third party add-ons (e.g. JSU, JMWE or Scriptrunner).
1. Create a custom number field (e.g. EpicClosure or FeatureClosure)
2. Add a "Value Field" Condition to the Done/Cancelled Epic Workflow transition to allow closing only if the EpicClosure is 1).
3. Create an automation rule to set EpicClosure to 1 when all the Stories which link up to the Epic are Done/Cancelled.
(When: Issue Transitioned - For Epic (parent) - if: Stories match Status in (Done, Cancelled) - then: Edit issue fields EpicClosure to 1).
4: Create a second automation rule to set EpicClosure to 0 when Stories aren't all in Done or Cancelled.
(When: Issue Transitioned - For Epic (parent) - if: Stories match Status not in (Done, Cancelled) - then: Edit issue fields EpicClosure to 0).
Hope this helps and have a good one.
Luca Calderone
Jira Admin
Hi @Luca Calderone I'm not sure if this provides a solution to the problem. As far as I can see, it only keeps a numeric field in the epics to know if they are closed or not, but you can still assign tasks to previously closed epics. Am I correct?
It looks like you're new here. Sign in or register to get started.