You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am trying to build an automation rule that meets the following requirements:
I am not sure how to implement step (3). I was hoping to put the percentage completion into a smart value for each Epic, and then use that value in step (4).
Hello @Fernando Martinez
Welcome to the community!
Generally Epics don't have Sub-tasks linked directly to them. Instead they have child Issues. Do you really need to look at subtasks or are you trying to look at child issues?
Can you show us the rule you have constructed so far? Are you selecting your Epics with a JQL that is part of the Schedule trigger?
@Trudy ClaspillThanks for the warm welcome!
> Do you really need to look at subtasks or are you trying to look at child issues?
Ah, yes, I meant child issues.
> Are you selecting your Epics with a JQL that is part of the Schedule trigger?
Right now I am using a manual trigger during the proof of concept phase, but yes I intend to use the same JQL in the Schedule trigger. I have a "Then: Lookup issues" step with the JQL that selects the target Epics. I confirmed that the list is correct by printing `{{lookupIssues}}` to the audit log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can set up a rule with a Schedule trigger and still run it on demand using the Run Now button. You don't have to create a Manual trigger rule for testing.
For testing, in your trigger you could set the JQL to select just one Epic. Make sure to uncheck the box below the JQL field.
For the next step you would then use a Lookup Issue action to get a list of all child issues of the Epic, regardless of status. Use "Epic Link" if the child issues are in Company Managed projects. Use "Parent" if the child issues are in Team Managed projects.
Record the number of issues returned in a variable.
Then do another lookup to find just the Done issues and record that count in another variable.
If the total child issues done is not 0
Create another variable to save the Done/Total value
{{#=}} {{TotalChildIssuesDone.asNumber}} / {{TotalChildIssues.asNumber}} {{/}}
Then you can express that as a Percentage using
{{DoneCalc.asNumber.asPercentage}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy ClaspillThanks, this is making a lot of sense! I have a follow up question.
> For the next step you would then use a Lookup Issue action to get a list of all child issues of the Epic
I would need to perform this and the subsequent steps for each Epic in the initial Issue Lookup action since I wouldn't be working with just one Epic in production.
Which automation constructs would allow me to repeat these steps for each Epic in the initial Issue Lookup step?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you include in the Schedule trigger a JQL statement to select issues, all the actions in the rule will then be performed against each issue returned by that JQL statement.
If you include the JQL to select Epics in the trigger then you don't need a subsequent Lookup step to retrieve the Epics.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! This worked perfectly. I accepted your answer, so feel free to edit the top level comment with the complete resolution if you have time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.