Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira Custom Fields | Sum up of values

Hi team,


1. Is there a way to sum up values of sub-tasks (for e.g., revenue)to add it to the task issue without using Script runner ?

2. Also is there a way to count the number of labels attached to an issue ?


Thanks in advance!

3 answers

1 accepted

1 vote
Answer accepted
John M Funk Community Leader Apr 24, 2020

Hi Shravya - Welcome to the Atlassian Community!

1. Yes, you can do that with the Automation For Jira tool built into Jira Cloud.

  1. Go to Project Settings > Project Automation (on left-hand menu)
  2. Press Create Rule in top-right corner
  3. Select the Trigger "Issue Created" and press Save
  4. Next Select to add an Action, and choose "Edit Issue"
  5. Select the field Label
  6. Select the options icon (3-dots) - and choose "Add/remove values"
  7. Enter the value you want as a default and press Save
  8. Name your Automation and turn it on

Now when each issue is created, it will add the desired default label as long as the issue is created in that project. You might need to refresh the page after each issue creation to see it.

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, then instead of going to Project Settings, go to Jira Settings (cog icon on left-hand navigation bar) > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

2. I am not aware of any way to count those. 

Hi John,

I understand this solution you mentioned, but i was looking more like summing up the values of my Custom Field "Revenue". The context is something like , we have a task for the product team and multiple sales users would create sub tasks for each of their client requirements and the revenue for all the sub tasks can be added to the parent task automatically. Is that possible ?

For 2, my use case is to understand how many users are asking for a product feature and labels was one way i thought could help (multiple sales guys would be adding their customers who require that product feature and we thought addition of all labels of customers). Is there any other way I can use it ?


Kindly suggest.

Thanks in advance!

John M Funk Community Leader Apr 27, 2020

Yes, every time the value of one field is updated, you can add it to the value of another field. So if you have a total field that has a value of 10 and then you change the value of a different field from 0 to 5, you can have the total field up date to add the current value plus the new value of 5 to make it 15. 

Got it, Thanks!

Hi John, 

I have a similar task as Shravaya has in  #1: need to show the sum of  Earned field (which is a custom number field) in all tasks in the Epic. 

I still cannot get what exactly to write in the Set value on 'Edit issue' component. Could you please help?Image 2020-05-05 20-48-50.jpg

John M Funk Community Leader May 05, 2020

Hi @Irène  - You would use something like:


But you would have to do that for one issue at a time. 

Thanks, John for the great idea!  I used {{issue.Earned}}+{{triggerIssue.Earned}} and it works as I wanted. 

John M Funk Community Leader May 05, 2020



I am trying to use the same type of calculation to sum numbers from a custom field called ROI. See screenshot. However when I use the Smart Value it isn't summing, I'm sure I'm missing something, it just keeps adding "+ number value" into the string in the parent. How could I make it so that when the child value is changed the parent value totals the new addition? Screen Shot 2020-08-20 at 7.28.33 AM.png

John M Funk Community Leader Aug 20, 2020

Hi Rachael - Is the ROI field a number type field?

Ah! Yes good catch ok that solves my addition problem. One follow up, hoping you may know? If I have $500 in a child and $400 in a child, they'll total into my parent as $900. However if I go back to one of the children and change the value it just adds again b/c I'm using an addition smart value. Is there a way for it to recalculate as well? Or would I need something else to do this?


Thank you SO much.

John M Funk Community Leader Aug 20, 2020

Yeah, that makes it a little more complicated. In the past I have used a process where I create a new Custom Field that captures the difference between the current value and the new value. Then it is the custom field value that I use to do the + with. 

I my case I only have SIL Engine (vendor cPrime) and I need to sum up numbers attachment files in sub-tasks and shows it on task. Any suggestions?



John, I am not seeing how this answer applies to my question.  I am trying to add 5 fields together in my ConfiForm, nothing to do with JIRA.  I tried formula ([entry.Amount1] + [entry.Amount2] + [entry.Amount3] + [entry.Amount4] + [entry.Amount5] ) but received error:

"Expression: [100+100+++] could not be calculated, Unknown operator '+++' at position 8"

You should really ask this as a new question, but what this means is you can "optional" fields and if you dont provide the values for all fields they stay empty and will fail.

What you shall be doing is to wrap these field values into ZEROIFEMPTY() function

(ZEROIFEMPTY("[entry.Amount1]") + ZEROIFEMPTY("[entry.Amount2]") + ZEROIFEMPTY("[entry.Amount3]") + ZEROIFEMPTY("[entry.Amount4]") + ZEROIFEMPTY("[entry.Amount5]"))  

John M Funk Community Leader Jan 14, 2021

I am not familiar with CondiForm - sorry. 

Thanks Alex I had that in my Rule but it was giving me the wrong answer, but if I enter in the Field formula its works.  It would be nice to know what the Rule gives me the wrong answer.  Because using the rule is nice to show the total right away to the user.

Thanks very much. 

It should work the same way in formula and in a rule (the rule should be "set expression")

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

15,045 views 38 49
Read article

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