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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

How do I total 5 fields together?

I have 5 value fields Amount1, Amount2, Amount3, Amount4 and Amount5.  I just want to total them to a field named TotalAmount.  I tried to use a ConfiForms rule but my totals are always wrong i.e. value of 100 in only field Amount1 give me a total of 500 in field TotalAmount:

TotalAmount=(ZEROIFEMPTY("[entry.R1Amount]") + ZEROIFEMPTY("[entry.R2Amount]") + ZEROIFEMPTY("[entry.R3Amount]") + ZEROIFEMPTY("[entry.R4Amount]") + ZEROIFEMPTY("[entry.R5Amount]")). 

Then I tried to find a formula that would just total the fields but can see to find a Total or Sum of 5 fields together example with no luck so far. 

 

Any help would be really appreciated.

5 answers

1 accepted

0 votes
Answer accepted

The simple answer was I had to use either a ConfiForms Field set as Formula (see below) or use a ConfiForms Rule Field set as formula, I choose the latter to provide the user total while in the form.

TotalAmount=(ZEROIFEMPTY("[entry.R1Amount]") + ZEROIFEMPTY("[entry.R2Amount]") + ZEROIFEMPTY("[entry.R3Amount]") + ZEROIFEMPTY("[entry.R4Amount]") + ZEROIFEMPTY("[entry.R5Amount]"))

If somebody uses the Table Filter and Charts for Confluence app, don't forget that its Table Filter macro can output the total column as well:

total column.png

Hi TTK,

Check out the accepted answer of THIS POST. Cheers!

Groovy will be your answer IMHO.

To do so , I would use a Scripted Field with Scriptrunner. (if you have)

If you would like a hand I am happy to help.

Hi TTK,

I can confirm that if you are using Jira Cloud then you could achieve this requirement with ScriptRunner for Jira Cloud by using a Scripted Field as described here or a Script Listiner as described here to sum the values of fields and store them on an issue.

If you are using Confluence Cloud then then you could achieve this requirement with ScriptRunner for Confluence Cloud by using a Script Listiner as described here and writing some custom groovy code to get the values you need and to sum these up and display them on your Confluence page.

I hope this information helps.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

58 views 2 1
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