HOWTO Calculated Number Field


I try to integrade a ranking system in JIRA. I'd create 3 "radio button" custom fields (rb1, rb2 and rb3) each with 3 options 1, 2 and 3. Then I create a "Calculated Number Field" and here is my problem...

I want that this Calculated Number Field count

rb1(option number) + rb2(on) +rb3(on) - 2 = ranking

I know I have to use html but I know really nothing about html and I think I have to insert my formula in the description or not sorry for my dumb questions.

Hope you can help me.

6 answers


This values, user select it in the screen?

No we (admins) select the 3 fields when someone create a ticket


If in screen, you can do it with javascript.

doesn't work :-(

<!-- @@Formula:

(issue.get("customfield_11188") != null ? issue.get("customfield_11188") : 0) + (issue.get("customfield_11189") != null ? issue.get("customfield_11189") : 0) + (issue.get("customfield_11190") != null ? issue.get("customfield_11190") : 0) - 2


What do you think about this solution?

OK we solved the problem. The right formula is:

<!-- @@Formula:
int i = (issue.get("customfield_11188") != null ? Integer.parseInt(issue.get("customfield_11188").toString()) : 0) + (issue.get("customfield_11189") != null ? Integer.parseInt(issue.get("customfield_11189").toString()) : 0) + (issue.get("customfield_11190") != null ? Integer.parseInt(issue.get("customfield_11190").toString()) : 0) - 2;
if (i >= 1)
return i;
return 66;

The 66 is only for a better understanding.

Thanks for you help

Hi, Can I know where to insert this formula ?

I created one custom field to summarize the number fields of customfield (11090~11094, and 11100)

Formula as below, however, the field can't display in defined screen @@

(issue.get("customfield_11090") != null ? issue.get("customfield_11090") : 0) + (issue.get("customfield_11091") != null ? issue.get("customfield_11091") : 0) + (issue.get("customfield_11092") != null ? issue.get("customfield_11092") : 0) + (issue.get("customfield_11093") != null ? issue.get("customfield_11093") : 0) + (issue.get("customfield_11094") != null ? issue.get("customfield_11094") : 0) + (issue.get("customfield_11100") != null ? issue.get("customfield_11100") : 0)

please kindly help, thank you,

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

706 views 1 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you