Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,796
Community Members
 
Community Events
184
Community Groups

Don't allow choosing closed epics

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

3 answers

1 vote
Pete Singleton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 06, 2018

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

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 :)

@Arkaitz Bastida 

Thank you for replying back :)

But this condition is not letting me move the epic to DONE. My requirement was to not allow adding new issues to an already closed epic :( Could you please help me out here. Thank you 

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.

epic mark as done.png

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 :).

Kind regards,
David

Like # people like this

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?

Kind regards,
David

Like Stephen Garber likes this

Hi @David Waldhans

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 :)

 

Arkaitz

Hi @Arkaitz Bastida ,

I understand, thanks for the clarification :)

Best,
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

0 votes
Ollie Guan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 06, 2018

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.

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.

Kind regards,
David

Like Thomas Rohrer likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events