Sum of effort copied from tasks to Epic

Colin Dawson November 30, 2023

First post here and new to Jira automation. A previous support request is very similar to my situation, but it doesn't work for me:

https://community.atlassian.com/t5/Jira-questions/How-to-sum-a-custom-field-value-from-child-issues-to-epic-parent/qaq-p/2201696

I also have multiple issues that are children of an Epic. The Epic contains a field that should be based on the sum of values derived from those child tasks. The rule is triggered manually from the Epic. It works if I put a static value in the code. The rule is completing with no error.

This code is adapted from the case referred to above. But for me it just sets the target field to "None" when I run it.

{
"fields": {
"customfield_10201": "{{lookupIssues.customfield_10200.sum}}"
}
}

If I swap out "{{lookupIssues.customfield_10200.sum}}" for a static number it works fine. Evidently I have neglected or misunderstood something important about the context.

1 answer

1 accepted

0 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @Colin Dawson 

Welcome to the Community!

I'm assuming the field on an Epic-level and child-level is a Number field? EG. Story Points?

---

If yes, a rule like this should work...

  • Trigger: Manual trigger from issue
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Epic
  • Action: Lookup Issues
    • JQL - parent = {{issue.key}}
  • Action: Edit Issue
    • Field = Custom Field
      • Value = {{lookupIssues.customfield_10200.sum}}

---

You shouldn't need to use JSON - you should be able to enter the smart value directly into the field's contents box instead from the main Edit Issue field menu.

Let us know if this works for you!

Ste

Colin Dawson November 30, 2023

Thanks Stephen, yes works like a charm. Thank you for fast and helpful answer.

Like Ste Wright likes this

Suggest an answer

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

Atlassian Community Events