Calculated number field not visible Edited

Hi all,

Banging my head against the wall here, any help would be greatly appreciated!

Re: add-on

I wanted a calculated number field to display a mean average of other number fields but no matter what I try the field does not display.I thought it was an issue with my code or syntax so in a effort to work out what I was doing wrong I copied and pasted the following bit of example code from the help pages, which is supposed to find the sum of 2 fields:

<!-- @@Formula: (issue.get("customfield_10114") != null ? issue.get("customfield_10114") : 0) + (issue.get("customfield_10150") != null ? issue.get("customfield_10150") : 0) -->

I changed the field ID numbers to ID's that are on the same screen as the issue I am testing against (both fields are set to a single digit integer in the issue I'm testing with). I expected the field to appear with the sum and then the plan was to keep making small changes until I found out what I was doing to break the code. However, even using the example code the field does not appear.

I thought maybe there was an issue with the add-on configuration itself but after speaking to my JIRA administrator it turns out there is no configuration to worry about, it is either installed and enabled or it isn't. The fact that I can create a calculated number field at all proves that it is both installed and enabled.

I made use of the "Where is my field" tool which confirms that "The '<fieldname>' field should be present on the form you are viewing".

So, given that my code is correct, the add-on is installed successfully and the field's visibility is properly configured, does anyone have any idea as to what is stopping the field from appearing?

Help me Atlassian Community, you're my only hope.

2 answers

This widget could not be displayed.
Joe Pitt Community Champion Jul 12, 2017

Should it be populated in the issue you're viewing? I don't know the behaviour of calculated fields on the edit screen, but empty fields don't show up in the view details page. 

Hi Joe,

Yes it should, both the custom fields referenced in the formula have a value so the calculated field has all the numbers it needs to return a sum.

This widget could not be displayed.

Okay I feel very silly now. I assumed the field would show up in the edit view which it doesn't, however it does show up in the issue details.

Joe Pitt Community Champion Jul 13, 2017

It makes sense it wouldn't show up in the edit screen because you shouldn't be editing it. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

531 views 3 19
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