Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sum field values from all issues in epic if another field equals a specific value (JMCF) Edited



I’ve been trying to create a custom field that sums all field values for all issues in an epic if a value of another field is equal to a specific value. 


I’ve been able to accomplish the sum, however I can’t get the condition to work. 


My exact case: 

sum all “Days Off” for all issues in an epic if “Day Off Type” = “Annual Leave"; “Holiday on Demand". 


What I got so far: 

issue.stories.sum {it.get("Days Off")}


I am not sure where to add the if and how to go through all of the stories of the epic.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Krzysztof Kiser ,

try this:

issue.stories.findAll {it.getAsString("Day Off Type") in ["Annual Leave", "Holiday on Demand"]}.sum {it.get("Days Off")}

@David Fischer _Innovalog_ This worked like a charm. Thank you very much for your help!

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you