Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Percentage complete field on Epic not updating with automated rule

Sarah Cheyne
December 8, 2025

I have set up an automated rule in our Jira instance so that the custom field 'Percentage completed' on an Epic will update based on the status of the Epic's child work items. So, when a Story, Task, Sub-task, Bug, Bug Sub-Task, or UAT Bug that is parented to an Epic has the Status updated to Removed, Done, Resolved, Rejected, or Closed, the 'Percentage completed' field will automatically update on the Epic. 

However, I have manually updated a Story that is parented to an Epic to 'Done' to check if the rule works, and the percentage has not updated. I have checked the audit log of the rule and it appears to have run, stating the epic has been updated, but the 'Percentage completed' field still stats 0%. 

To troubleshoot, I have checked the type of the custom field is correct (set to Number Field), and updated the Actor of the rule to myself, as I wondered if it was a permissions issue with the Automation for Jira actor. 

The rule is:

 

Trigger: When work item transitioned to Removed, Done, Resolved, Rejected, Closed

 

Issue type is one of Story, Task, Sub-task, Bug, Bug Sub-Task, UAT Bug

 

Branch: For Parent

 

Then: Lookup work items:

parent = {{issue.key}}

 

And: Lookup work items:

parent = {{issue.key}} AND status in (Resolved, Done, Removed, Closed, Rejected)

 

And: Create variable:

Variable name = totalChildren

{{lookupIssues.size|0}}

 

And: Create variable:

Variable name = closedChildren

{{lookupIssues_1.size|0}}

 

If: Compare two values

First value = {{totalChildren}}

Condition = greater than

Second value = 0

 

Then: Create variable

Variable name = percentComplete

{{#=}}{{closedChildren}} / {{totalChildren}} * 100{{/}}

 

And: Edit work item fields

Field = Percentage completed

{{percentComplete}}

 

Can anyone provide some suggestions or pointers as to why this isn't updating the field? Eventually I would like to create the same rule to update the Features and Initiatives we have set up

Any help much appreciated

Thanks

2 answers

2 accepted

3 votes
Answer accepted
Trudy Claspill
Community Champion
December 8, 2025

Hello @Sarah Cheyne 

Welcome to the Atlassian community.

Each execution of a Lookup Issues action overwrites the result of the previous Lookup Issues action. You cannot execute multiple such actions and the reference the results of one versus another using {{lookupIssues_#}}

After the first Lookup Issues action you have to use the Create Variable action to create you totalChildren variable.

Then you can execute the next Lookup Issues action and create the closedChildren variable.

As it stands your current first create variable action is looking at the results of your second Lookup Issues action.

And your second create variable action is getting the value 0 because there is no such smart value as {{lookupIssues_1}}

 

Sarah Cheyne
December 9, 2025

Hi Trudy

 

Thanks for your help. I switched the order and renamed the variable for closed Children so it reads as follows:

 

Trigger: When work item transitioned to Removed, Done, Resolved, Rejected, Closed

 

Issue type is one of Story, Task, Sub-task, Bug, Bug Sub-Task, UAT Bug

 

Branch: For Parent

 

Then: Lookup work items:

parent = {{issue.key}}

 

And: Create variable:

Variable name = totalChildren

{{lookupIssues.size|0}}

 

And: Lookup work items:

parent = {{issue.key}} AND status in (Resolved, Done, Removed, Closed, Rejected)

 

And: Create variable:

Variable name = closedChildren

{{lookupIssues.size|0}}

 

If: Compare two values

First value = {{totalChildren}}

Condition = greater than

Second value = 0

 

Then: Create variable

Variable name = percentComplete

{{#=}}{{closedChildren}} / {{totalChildren}} * 100{{/}}

 

And: Edit work item fields

Field = Percentage completed

{{percentComplete}}

 

The field is now updating on the epic. Do you have any suggestions to round the number so it displays as 0 decimal place? E.g. 3.85 would be 4%

I have tried to add the rounding to the edit work item field so it reads as {{percentComplete.round(0)}} but when I do that the field doesn't update at all

 

Thanks

Trudy Claspill
Community Champion
December 9, 2025

The round function doesn't take any inputs. Try removing (0)

Ref: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#Round

Like Bill Sheboy likes this
0 votes
Answer accepted
Bill Sheboy
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 Champions.
December 13, 2025

Hi @Sarah Cheyne -- Welcome to the Atlassian Community!

Yes, and...to the solution you already have worked out with Trudy: a couple of things to consider:

a) With so many "done" status values, you may want to use a single lookup and check the statusCategory instead using list-filtering.  That will ensure if the status values change in the future, the rule will still work.  For example:

  • trigger: work item transitioned to one of your "done" ones (or, just add a condition to check the statusCategory with a JQL condition)
  • field values condition: issue type is one of Story, Task, Sub-task, Bug, Bug Sub-Task, UAT Bug
  • branch: to parent
    • action: lookup work items, getting all the children with parent = {{issue.key}}
    • action: edit work item, setting the percentage complete to...
{{#=}}ROUND( ( 0{{#lookupIssues}}{{#if(equals(status.statusCategory.name,"Done"))}}+1{{/}}{{/}} ) / {{lookupIssues.size|0}} * 100, 0){{/}}

That works by...

  • iterate over the lookup result
  • filter for only work items with a statusCategory of "Done"
  • adding +1 to the result
  • with a default of 0 at the front
  • wrapping that sum within parentheses
  • and dividing by the total number of work items
  • multiplying by 100, and
  • finally rounding to a whole percentage number

 

b) Your initial rule handles the case of the child work items transitioning status.  And, there are several other possible things which could change and impact the percentage.  Please consider how accurately you want the number, when you want it updated, and then decide if you want to add other rules to help.  Those include at least:

  1. When a child item transitions status, update the parent (This is your current case.)
  2. When a new child item is created with a parent, update the parent
  3. When a child item is added to a parent, update the parent
  4. When a child item is removed from a parent, update the previous parent
  5. When a child item changes parents, update both the current and previous parent
  6. When a child item is deleted, update the previous parent
  7. When a child item changes type such that it no longer has a parent, update the previous parent
  8. When someone manually changes the parent percentage, recalculate it
  9. When automation executions exceed service limits, rules will halt running.  Please discuss this case with your peer admins to decide how to proceed.
  10. When Atlassian has an incident / outage impacting automation rules, there is no documentation on which rules will run later to "catch up".  A mitigation for this situation is to create a Scheduled trigger rule which can iterate over the parent Epics and update all of them as a precaution.  The rule could be left disabled until needed, run until caught up, and then disabled again.
  11. etc.

Some of these cases can be combined by adding more conditions to rules.

 

Kind regards,
Bill

Sarah Cheyne
December 14, 2025

Thanks Bill! I have updated the automation rule based on your suggestion above

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events