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?
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.
The steps I followed were:
1) Add a condition
2) Script Condition [ScriptRunner]
3) Allows the transition if this query matches a JQL query
4) Add the following query: issueFunction in issuesInEpics("'Epic Status' = 'In progress' OR 'Epic Link' is EMPTY")
And it worked for me :)
Hello @Aisha M ,
Epics have two different statuses, the normal workflow status and the Epic status.
To prevent Epics from appearing in the Epic list when creating or editing an issue, you have to set the Epic status to Done.
In the following screenshot you can see how to do that.
Please not that this does not completely prevent users from association issues with closed Epics. The Epic list in the issue edit view just hides closed Epics by default, but there is a checkbox inside that list that lets you see and associate closed Epics as well. However, I think hiding by default is enough in most cases, hopefully in your case as well :).
Hello @Aisha M ,
sorry, I just realized that you probably already knew about the possiblity to hide closed Epics.
However, for people like me who didn't know there was a difference between Epic status and normal workflow status of an Epic this is a helpful info, so I am leaving it here.
@Pete Singletonand @Arkaitz Bastida : One remark regarding the solutions including validations/conditions on workflow transitions. I am not really sure whether those are really a solution to the problem. You could always just associate an already existing issue to an Epic. In this case no workflow transition is executed. Hence, no validation/condition is executed and can help prevent adding an issue to a closed Epic. Or am I missing something?
I would prefer not to be able to select closed epics, but that's not possible in Jira (at least, nobody has told me how to do it). With validations/conditions you don't avoid selecting them, but you avoid changing the workflow, so that you won't add worked hours to closed epics and change epic's statistics that were closed.
It's not perfect, but it works for me :)
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.
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
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