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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Sum of three single select list fields using groovy in JIRA

Looking for sample script for Sum of three single select list fields using groovy in JIRA and that should show in another numeric scripted custom field.

 

 

 

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 07, 2021

Select list fields store options you select, not numbers, so you can't just add them up.

You will need to read the value of each field and convert from an option to a number (bearing in mind one of your admins could easily add something like "three" or "twelvety" as options, so you'll need to catch non-numbers), then add them up

https://library.adaptavist.com/entity/calculate-the-sum-of-all-values-of-a-custom-field-in-linked-issues is an example of adding up numbers into another field, after you've converted to numerics.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events