HOWTO Calculated Number Field

Hi,

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

Hi,

This values, user select it in the screen?

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

hi,

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;
else
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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,938 views 19 22
Read article

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