Hi everyone,
I'm working on an automation rule in Jira to calculate the completion percentage of child issues at the Initiative level. My hierarchy is Initiative > Epic > Task, and I want this rule to pull in all linked Epics under the Initiative and then look up the tasks under each Epic to calculate a completion percentage.
My goal is to update a custom field, Initiative Progress %, on the Initiative based on the completion of all its child tasks.
Here’s how I have it set up:
Custom Field: I created a custom field, Initiative Progress %, to display the completion percentage at the Initiative level.
Automation Rule:
- Trigger: Issue Updated
- First Lookup Issues: This fetches all Epics under the Initiative:
"Parent Link" = {{triggerIssue.key}} AND issueType = Epic - Second Lookup Issues: This fetches all tasks under the Epics from the first lookup:
"Epic Link" in ({{#lookupIssues}}{{key}}{{^last}},{{/}}{{/}})
Calculation Formula: I’m using this formula in an Edit Issue action to update the "Initiative Progress %" field:
{{#=}}100 * {{lookupIssues.filter("status.category.name == 'Done'").size}} / {{lookupIssues.size}}{{/}}

The Issue:
The formula is returning 0%, even though the Lookup Issues actions are pulling the correct set of Epics and tasks based on the audit log.

It seems like the calculation isn’t picking up the completed tasks correctly, even though I expect it to filter for "Done" statuses.

Any insights on what might be going wrong or further troubleshooting steps? I’d appreciate any help! Thanks so much!