I am working on writing an automation that will notify me if an issue has been linked to an epic that has already been marked DONE.
I have already written an automation rule that will auto-close a Parent-Epic if all the children meet the following criteria:
What I want to do is create an automation rule that will notify me if something changes on an already DONE epic, like:
So far, I cannot find a way to write the rule for an issue that has been epic-linked. The only links that are available to choose are things like "deploys, relates to, etc..."
A) is there another way to write this?
B) Is there a way to write an automation rule that prevents changes to issues in an EPIC that has been marked DONE?
There is a different approach to this. Do you truly need to be notified in real-time that something has been added to a closed Epic? If not, then I might suggest a simpler solution.
Use a Scheduled trigger that runs, say, at 9am and 2pm weekdays. It runs through all the Epics which are Done in the configured projects, and uses a Branch to scan the children of those Epics for anything that is not Done.
A further suggestion (regardless of the approach used) is to rely on the "Status Category" field, not the "Status" field.
@Mykenna Cepek I do not need to necessarily run real time, but pretty soon after so I can check it. A scheduled trigger may be helpful. Is there an example of how I might write this rule to check for any open issues on DONE epics?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mykenna Cepek made an excellent point about Status vs. Status Category.
Note, though, that Status Category is not in the list of fields that you can choose from in an Issue Fields Condition in a Rule. You could use a JQL Condition instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, @Trudy Claspill, it's not an option.
Please, everyone, take a moment and vote for these enhancement requests:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mykenna Cepek i created a scheduled rule to check for any open issues in DONE epics and it appears to be working!! yay! this sends me an email of any issue it finds that does not meet the JQL criteria. I think this might solve my issue, at least as an MVP. Nice suggestion! Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's an example construct. You'll have to complete it to work like you want:
I used a CRON expression in the Scheduled trigger that will never trigger, so I can use the "Run rule" button to test it while I'm developing the rule.
The JQL for the trigger finds all the completed Epics, and passes that to the rule.
The branch then loops through the child issues of each closed epic, looking for any that are not Done. If any are found, this example uses the Audit Log action to note them in the log.
I'd uncheck the "Only include issues that have changed..." option, just because child issues may have changed underneath Epics that have not changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is the rule in case anyone else was wondering:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd recommend using parenthesis around your AND and OR clauses to ensure they are working exactly as you intend.
Gripe: The JQL documentation is not clear on this sometimes. I've seen the docs say that JQL is "evaluated left to right" and also that "AND takes precedence over OR". It can't be both.
You probably want:
status not in ("done", "Cancelled") or (status = done and fixversion is empty)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't list the JQL you are using in the trigger. That's important.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
good point, here is the JQL used for the scheduled portion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, that JQL isn't ambiguous or concerning at all. Glad you got it working!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jayme Burkhalter
Can you show us the Rule(s) you have already tried?
Are you working with a Company Managed project or a Team Managed project?
You cannot use a Rule to block a Status change. That can be done only through the workflow transitions.
I'll do some experimenting on creating a rule that would send an alert in the circumstances you specify, and get back to you (if somebody else doesn't beat me to it).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you have multiple scenarios to address:
1. When an issue is created and simultaneously (during issue creation) made a child of an epic.
2. For an already existing issue, when it is linked to an epic.
3. For an existing issue that is already linked to an epic and the child issue status is changed. -- This one could potentially be handled by a workflow transition condition blocking re-opening the child issue if the parent epic is in a Done status.
This rule satisfies #1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill The top image is an example of a rule I tried to write for a new issue that gets created and has an Epic Parent but it didnt work.
The bottom two images are the automation rules I wrote to auto-close the epic when the children have all been marked DONE and assigned Fix Versions
Its not so much the creation of the new issue, its when it is epic-linked to a closed Epic
At the very least, I just want to be notified if anything changes on an epic that has already been marked DONE. If a new issue is added, or put back into a state other than DONE, I need to know to follow up with the team on what's going on.
If I am creating a rule that auto-closes the Epic based on all child stories being DONE and having FixVersions, then I need to know that there is nothing that will compromise the integrity of the DONE status of the Epic. Checks and Balances :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our responses crossed in the ether. :)
I posted a rule that will handle the scenario of a new issue being added to an Epic that is marked as done. Now here is one that handles a child issue being reopened when its parent Epic is already set to Done. You would replace the Log Action with a Send Mail action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Ahh, awesome, i will try those. How do I make it send an email to just me for instance? Or perhaps 2 specific people?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating a rule to check if an existing issue is added to an Epic and the Epic is done is more complex. There is not a built in method to check if the Epic Link field (used in Company Managed projects) is changed.
In responses on this post @Bill Sheboy goes over using an Advanced Compare Condition to check if the Epic Link field changes.
And this rule satisfies the condition of an existing issue being updated to make it a child of an Epic that is already Done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you use the Send Mail action you are given a field where you enter the email addresses to which you want to send the message. You also have some options to select user groups and user fields set in the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Have tried all of these and the rules are not running for some reason. I need it to run off of the Epic Link field being changed to a DONE epic but that is not a selectable field. Tried writing the rule like the one above and it did not even run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide specifics of the rule you created and then the event you executed.
Did you look at the audit log for the rule? Does it show the rule is triggered?
Is the rule published and turned on?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.