How to configure a rule for the "Original estimate" field
Asked by Laura Cag?e:

I want to sum the values filled in the "original estimate" field of each subtask created from a Story, and see the sum in the "original estimate" field of this Story (main/parent issue).

I'm trying to configure a rule for that, but in the first step of the rule when you select the "Field value changed", I can't select the "Original Estimate" field because it isn't appear on the dropdown options.

![Captura de pantalla 2024-08-23 a las 14.19.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/343473i7257896E549465FD/image-dimensions/211x193?v=v2 "Captura de pantalla 2024-08-23 a las 14.19.04.png")

I have seen other topics about this problem but I tried unsuccessful.  

Can you help me please? It's easy to configure rules for another fields but it's going very frustrating with this one.


Answers:
author: Bill Sheboy
body: Hi [@Laura Cag?e](/t5/user/viewprofilepage/user-id/5575079) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see that information...

To have the Story's Original Estimate include the value from all of the subtasks, there are several cases to handle:

1. sub-task created
2. sub-task's Original Estimate updated
3. sub-task changes to a new parent issue (or deleted)

Let's focus on the first two cases. Your rule could sum the values from the sub-tasks with this expression:

```
{{issue.subtasks.timetracking.originalEstimateSeconds.sum|0}}
```

For the second case when you want to check for a change to Original Estimate, in the Field Value Changed trigger, select the generic *Time Tracking* entry to include that one.

Kind regards,  
Bill


author: Shikha Verma
body: Hi [@Laura Cag?e](/t5/user/viewprofilepage/user-id/5575079) ou can try this:  
Instead of using the "Field value changed" trigger, use the "Issue Created" and "Issue Updated" triggers. This will ensure the rule runs whenever a subtask is created or its original estimate is updated.  
Add a condition to check that the issue type is "Sub-task." This ensures that the rule only applies to subtasks.  
Use the "Lookup Issues" action to find all subtasks linked to the parent story. You can use JQL like `parent = {{issue.parent.key}}` to fetch all subtasks.  
Action: Add a "Branch rule / related issues" action to loop through the subtasks found in the previous step. Use the "Edit Issue" action within this branch to update a custom field in the parent issue with the sum of the "Original Estimate" fields of all subtasks. OR If you're using Jira Cloud, you can use smart values like `{{lookupIssues."Original Estimate".sum}}` to calculate the sum of the original estimate fields.  
After calculating the sum, use the "Edit Issue" action to update the "Original Estimate" field of the parent story with the calculated sum.  

If the "Original Estimate" field still doesn't appear in the dropdown, you might need to Ensure the field is available and visible on the relevant screens for both subtasks and the parent story. Also Check if any permissions or field configurations are restricting access to this field.   

Hope this will help!

comments: author: Bill Sheboy
body: Hi [@Shikha Verma](/t5/user/viewprofilepage/user-id/4990585)

**Please stop posting content from bot / generated tools.** This answer cannot work as once inside of a branch, issues outside of the branch cannot be updated.

Kind regards,  
Bill


Tags: atlassian-marketplace

atlassian-marketplace-cloud

cloud