Forums

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

Jira Automation rule is not functioning

HQRAZAHS
Contributor
August 21, 2025

Hello Folks.

I am working on a company-managed project. I have created one custom fields 'percentage completion'  for Epics which will show the progress of epics (depends on the task status to Done). The tasks are the child of epics in my project.

To manage this setup, I am using Jira automation rule. I create the rule and using the template {{#=}}{{#lookupWorkItems}}{{#filter(status = "Done")}}{{/}}{{size}}{{/}} / {{lookupWorkItems.size}} * 100{{/}}. The screenshot below shows my rule setup. 
Rule setup.png

After I enable/activate the above rule, I see the epic percentage is getting calculated in the main page. But the problem is, I don't see the same value populated in the custom field 'percentage completion' at the side panel. See the screenshot below.

Jira view.png

I checked for logs and I get this.
image (10).png

After this error log, I used the below template. Added parenthesis (***).
{{#=}}({{#lookupWorkItems}}{{#filter(status = "Done")}}{{/}}{{size}}{{/}} / {{lookupWorkItems.size}}) * 100{{/}}

Still the %age competition was not displayed in the side panel. In addition to this I am not getting the error logs anymore which is a hint that the rule is not even getting triggered. Here is the latest screenshot of the error log page.

Audit Logs updated.png

I hope I gave all the required information, but still i anything else is required please let me know and I will share. All I want is - the %age completion should also show in the custom field of side panel. 

IMPORTANT NOTE - If I manually enter the %age calculation while creating an epic, I see the value on the side panel.

 

3 answers

0 votes
Stephen_Lugton
Community Champion
August 21, 2025

Hi @HQRAZAHS 

As well as looking at the comment from @Jeroen Poismans , you could also consider using .multiply(100) rather than '* 100', and similarly for divide use .divide(lookupIssues.size):

image.png

 

See https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/ for other maths functions

0 votes
Duc Thang TRAN
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.
August 21, 2025

Hello @HQRAZAHS 

If your goal is to see the % completion of child issues in a custom field of an Epic, you need to use smart values in the Lookup Issues action in order to retrieve that.

 

First, use Lookup Issues to get all child issues that are done

  • parentEpic = {{triggerissue}} and statusCategory = done

then create a variable a = {{lookupIssues.size}}

Second, use Lookup Issues to get all child issues

  • parentEpic = {{triggerissue}} 

then create a variable b = {{lookupIssues.size}}

For the Edit Issue action, if your field percentage completion is a numeric field, here is a smart value: {{#=}} ({{a}} / {{b}}) * 100 {{/}}

If it is a text field: {{#=}} ({{a}} / {{b}}) * 100 {{/}}%

2025-08-21 11_31_28-Audit log - Automation - Admin Jira - Test - Jira — Mozilla Firefox.png

0 votes
Jeroen Poismans
Community Champion
August 21, 2025

Hi!

I might be overlooking something, but before I'm testing further, could it be that your rule is missing a step? You are referencing lookupWorkItems, but I dont' t see the lookup step?

Screenshot 2025-08-21 104647.png

Can you start by confirming this?

 

Jeroen Poismans
Community Champion
August 21, 2025

Anyway,

Here is what the lookup should look like:

Screenshot 2025-08-21 105504.png

Also, use the lookupIssues smartvalue when referencing the search result, lookupWorkItems did not work in my example.

Let me know how this goes.

Suggest an answer

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

Atlassian Community Events