Need help to create a rule which calculates the story points for a story ticket based on the sum of original estimates in its subtasks. Estimates are converted to story points where 1 day equals 1 story point,
and estimates less than 5 hours are considered as 0.5 days.
estimate more thann 5 hrs are considered as 1 day
Hi @Neeta Dubey ,
This can be done using Project Automation with lookup + smart values.
Trigger
When: Issue updated
Condition: Issue type = Sub-task
(Optional) Only when Original Estimate changes
Branch
Related issues → Parent (Story)
Lookup issues
parent = {{issue.key}}
(This fetches all subtasks of the Story)
Create variable (for total story points)
Name: totalSP
Value:
{{#=}}
{{lookupIssues.sum(
estimateSeconds >= 18000 ? 1 :
estimateSeconds > 0 ? 0.5 : 0
)}}
{{/}}
Exp:
18000 seconds = 5 hours
≥ 5 hours → 1 point
< 5 hours → 0.5 point
No estimate → 0
Action
Edit issue (Story)
Set Story Points to:
{{totalSP}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The error is happening because Jira Automation does NOT support conditional logic (? :) inside lookupIssues.sum().
That’s why you’re seeing “Unable to render smart values / Empty expression”.
Direct math inside sum() won’t work.
Simple Working Approach (supported way)
Do it in two steps using branches, not one formula.
Trigger
Issue updated
Issue type = Sub-task
Original Estimate is not empty
Branch
Related issues → Parent
Lookup issues
parent = {{issue.key}}
Create variable – totalSP
{{#=}}
{{lookupIssues.sum(estimateSeconds) / 28800}}
{{/}}
Explanation:
28800 seconds = 1 working day (8 hrs)
Jira supports basic math, not conditionals
This gives correct Story Points in days
Edit issue (Story)
Story Points = {{totalSP}}
About the 0.5 / 1 day rule
Jira Automation cannot bucket values like:
<5 hrs = 0.5
>5 hrs = 1
…inside a single rule. That logic requires:
Multiple rules, or
Workflow validators / scripting (ScriptRunner)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari,
I've script runner plugin also. I'll try that , I was assuming that if its possible to achive via Automation rule, but this explanation helps. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the source for the information in your initial post, as that would not work in an Atlassian Automation rule?
As a reminder, when posting bot / AI-generated content, particularly for automation rules, it should be first validated and then the source disclosed in the text of the post. To learn more, please see the community guidelines:
https://community.atlassian.com/forums/custom/page/page-id/rules-of-engagement
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the misunderstanding. The solution was proposed by me based on my own calculations; it was intended as an overview and not a complete rule. I apologize if it came across as inappropriate. I will be more careful going forward and ensure better clarity next time. And thanks for the advice.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Neeta Dubey
Although it is possible to use list iteration and filtering to perform the value mapping and summation you describe in an automation rule, why not just use time-based estimation rather than Story Points? That will save time, confusion, and reduce the chance of errors in moving back-and-forth between the units of measure.
If you still want to perform this type of value mapping, here are some sources to help:
Kind regards,
Bill
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.