Automation for custo field to sum original estimate.

Jeffrey_Denton January 16, 2025

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:

  1. Track Time Changes: Monitor changes to the Original Estimate field on Task and Story tickets in the Execution Project.

  2. 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.

  3. 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.


Technical Workflow:

  1. Trigger:

    • When the Original Estimate field is updated on a Task or Story in the Execution Project.
  2. Branch to Related Issues:

    • Identify the linked Idea ticket using the relationship type "is implemented by" (from the Idea's perspective) or "Implements" (from the Task/Story's perspective).
  3. Calculate the Total Estimate:

    • Aggregate the Original Estimates from all linked Task and Story tickets that are connected to the Idea.
  4. Update the Idea Field:

    • Update the Total Project Estimate field on the linked Idea ticket with the aggregated total, converted from seconds to hours.

Key Considerations:

  1. Cross-Project Linking:

    • The automation must handle issues across two projects:
      • The Idea Project (where Ideas are stored).
      • The Execution Project (where Tasks and Stories are created and updated).
  2. Link Type Directionality:

    • The relationship between the Idea and the Task/Story must be clearly defined:
      • From the Idea’s perspective: "is implemented by".
      • From the Task/Story’s perspective: "Implements".
  3. Field Accessibility:

    • The Total Project Estimate field must be editable on the Idea ticket.
    • The automation actor must have the necessary permissions in both projects.
  4. Error Handling:

    • The automation should gracefully handle scenarios where:
      • No linked Idea exists for a Task/Story.
      • The Original Estimate field is missing or blank on certain issues.

Example Scenario:

  1. An Idea ticket (IDP-1) in the Idea Project is linked to three tickets in the Execution Project:

    • A Task (EP-101) with an Original Estimate of 8 hours.
    • A Story (EP-102) with an Original Estimate of 6 hours.
    • Another Task (EP-103) with an Original Estimate of 4 hours.
  2. A user modifies the Original Estimate on EP-102 to 10 hours.

  3. The automation triggers and calculates the new total:

    • 8 + 10 + 4 = 22 hours.
  4. The Total Project Estimate field on IDP-1 is updated to reflect 22 hours.


Automation Rule Structure:

  1. Trigger: Field Changed – Original Estimate (Tasks/Stories).
  2. Branch: Related Issues – Linked via "Implements" or "is implemented by".
  3. Action 1: Create Variable – Aggregate Original Estimates.
  4. Action 2: Update Field – Total Project Estimate on the Idea.

 

Here is the automation:

screencapture-rk-industries-atlassian-net-jira-settings-automation-2025-01-16-14_52_02-edit.png

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2025

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?

Jeffrey_Denton January 16, 2025

The rule is not giving my results and I expect it to sum all original estimates into this custom field.  

 

Here is the audit Logscreencapture-rk-industries-atlassian-net-jira-settings-automation-2025-01-16-15_07_34-edit.png

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:

screencapture-rk-industries-atlassian-net-jira-settings-automation-2025-01-16-15_11_38-edit.png

 

A task or story will not be linked to more than one idea.  

Scope:  Global

Suggest an answer

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

Atlassian Community Events