I'm having trouble trying to get this automation to work:
To ensure that the custom field Total Project Estimate field on an Idea ticket is automatically updated whenever the Original Estimate field of any linked Task or Story is modified. This automation should:
Track Time Changes: Monitor changes to the Original Estimate field on Task and Story tickets in the Execution Project.
Sum Estimates Across Linked Issues: Sum up the Original Estimates for all Tasks and Stories linked to the Idea via the "is implemented by" or "Implements" link type.
Update the Idea Field: Update the Total Project Estimate field on the linked Idea ticket in the Idea Project with the cumulative sum (in hours) of all linked Task/Story estimates.
Trigger:
Branch to Related Issues:
Calculate the Total Estimate:
Update the Idea Field:
Cross-Project Linking:
Link Type Directionality:
Field Accessibility:
Error Handling:
An Idea ticket (IDP-1) in the Idea Project is linked to three tickets in the Execution Project:
A user modifies the Original Estimate on EP-102 to 10 hours.
The automation triggers and calculates the new total:
The Total Project Estimate field on IDP-1 is updated to reflect 22 hours.
Here is the automation:
That rule description / information looks like stuff from a bot / AI-chat. If it is, please review the community guidelines to identify sources when posting such content: https://community.atlassian.com/t5/custom/page/page-id/rules-of-engagement
Back to your questions...
As written, that rule will neither identify the one-and-only-one linked Idea in the JPD project nor will it sum the values. Both may be solved using the Lookup Issues action. For example:
This rule will need multiple-project scope, and so your Jira Site Admin will need to help create the rule.
Kind regards,
Bill
Thank you for your response. I do appreciate. I read the posted link you presented, thank you. I will adhere to guidelines. I attempted the automation myself and ran into issues then attempted other sources as you identified. I will attempt it again with your suggestions. Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried what you suggested:
Here is the audit log. You can see it did not update the custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @Jeffrey_Denton
Your new rule is missing the branch to the Idea found and the second Lookup Issues action to gather the issues linked to the Idea. Please add those and re-test. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right. I added the Branch, which was a little tricky. Now I'm having an issue trying to get it from seconds to hours. I'm going to work on it a minute and try a couple more solutions /3600 doesn't seem to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try wrapping that in a math expression for the division to convert from seconds to hours:
{{#=}}{{lookupIssues.timetracking.originalEstimateSeconds.sum|0}} / 3600{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried that and it didn't work, but what I tried and it worked was:
{{lookupIssues.timetracking.originalEstimateSeconds.divide(3600).sum|0}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is curious as both should work, although producing different results...
I recommend performing the division after the sum:
{{lookupIssues.timetracking.originalEstimateSeconds.sum.divide(3600)}}
The reason is the smart value originalEstimateSeconds is an integer, and inline math operations preserve the typing. Thus dividing inline will round-downward to an integer, and possibly drop up to 1799 seconds, or 29 minutes, per issue. Summing first will combine the values before the division (although still losing any fractional hours).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jeffrey_Denton
Is the problem that you think the rule you have should give you the desired result? Or is the problem that the rule doesn't give you the desired result and you are not sure how to fix it?
What are the details of the Create Variable and Edit Issue steps?
What is the output in the Audit Log when this rule runs?
What is the Scope of the rule from the Rule Details page?
Can a Story/Task be linked to more than one Idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule is not giving my results and I expect it to sum all original estimates into this custom field.
Here is the audit Log
here is the details of the create variable:
variable name: sumOriginal Estimate
Smart Value: {{issue.issuelinks.where("type = 'is implemented by'").issues.timeoriginalestimate.sum|0}}
Here is the Edit Issue Steps:
A task or story will not be linked to more than one idea.
Scope: Global
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.