Custom fields of Calucate number fields are found missing when we have added JIRA Misc Custom Fields plugin

Hi Team,

I had added "JIRA Misc Custom Fields plugin"  in JIRA. Later I have added the " calculate number custom fields". When I have re-indexed JIRA, Those fields are missing post re-index. Now I am unable to add any custom fields. Could you please let us know reason for this issue.

 

Please 

 

Thanks and Regards'

Dhananjay M.Mukhedkar

 

8 answers

0 votes
Tarun Sapra Community Champion Aug 09, 2016

Are you fields present in the custom field section, can you make sure they are available on the screen and field configurations as well.

They are available Tarun. However , I am unable to add a new custom field.

Tarun Sapra Community Champion Aug 09, 2016

Can you please try enabling/Disabling the plugin from the admin section of "Manage Add-ons"

Your problem is that you inadvertently didn't correctly close the HTML comment in the Description of your calculated custom field that contains the formula. This prevents JIRA's Custom Field screen from showing anything that comes after the calculated field.

If you look inside atlassian-jira.log, you will find an error message followed by a URL you can use to edit the calculated field and fix the comment (it should be closed with "-->").

Hi Tarun,

It is not available on the screens and configuration and field configurations as well.

Thanks and Regards

Dhananjay M.Mukhedkar

JIRA always computes the value of Calculated Fields, regardless of whether they are present on screens or field configuration schemes.

Anyway, your problem is with the configuration screen - see my previous answer.

1st one for addition

 

<!-- @@Formula:

log.error("Value of field 20282 is: "+issue.get("customfield_20282"));

log.error("Value of field 20281 is: "+issue.get("customfield_20281"));

log.error("Value of field 20283 is: "+issue.get("customfield_20283"));

log.error("Value of field 20283 is: "+issue.get("customfield_20284"));

 

 

if (issue.get("customfield_20281") == null || issue.get("customfield_20282") == null || issue.get("customfield_20283") == null)

    return null;

 

a= Integer.parseInt(issue.get("customfield_20281").trim()) + Integer.parseInt(issue.get("customfield_20282").trim()) + Integer.parseInt(issue.get("customfield_20283").trim());

 

v= Integer.parseInt(issue.get("customfield_20284").trim());

 

return

 

a/v;

 

 

-->

1st one for division, 

<!-- @@Formula:

log.error("Value of field 20282 is: "+issue.get("customfield_20282"));

log.error("Value of field 20281 is: "+issue.get("customfield_20281"));

log.error("Value of field 20283 is: "+issue.get("customfield_20283"));

log.error("Value of field 20283 is: "+issue.get("customfield_20284"));

if (issue.get("customfield_20281") == null || issue.get("customfield_20282") == null || issue.get("customfield_20283") == null)

    return null;

a= Integer.parseInt(issue.get("customfield_20281").trim()) + Integer.parseInt(issue.get("customfield_20282").trim()) + Integer.parseInt(issue.get("customfield_20283").trim());

v= Integer.parseInt(issue.get("customfield_20284").trim());

return

a/v;

 

-->

2nd one for addition,

<!-- @@Formula:

log.error("Value of field 20282 is: "+issue.get("customfield_20282"));

log.error("Value of field 20281 is: "+issue.get("customfield_20281"));

log.error("Value of field 20283 is: "+issue.get("customfield_20283"));

 

if (issue.get("customfield_20281") == null || issue.get("customfield_20282") == null || issue.get("customfield_20283") == null)

    return null;

 

return Integer.parseInt(issue.get("customfield_20281").trim()) + Integer.parseInt(issue.get("customfield_20282").trim()) + Integer.parseInt(issue.get("customfield_20283").trim());

 

-->

When I used these scripts and enable JIRA Misc Custom Fields plugin, the calculated custom fields are getting lost and I am unable to add any custom field.

Did you read my previous replies?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

68 views 3 2
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