In the jira Catalina.out log files there are many (1.75m) errors like this associated with the 'Estimated Cost' scripted field.
2015-07-06 12:32:03,650 NodeReindexServiceThread:thread-1 ERROR [onresolve.scriptrunner.customfield.GroovyCustomField] Script field failed on issue: XI-132, field: Estimated Cost
java.lang.NullPointerException: Cannot get property 'value' on null object
The script is:
def templateType = getCustomFieldValue("Template Type").value;
def multiplier = (templateType == "NEQL"
: (templateType == "N+"
def estimate = multiplier * issue.getOriginalEstimate() / 3600;
return String.format( '%,d', estimate as int);
We have tracked the problem to the fact that thsi custom field was defined as global. So it was processing the field for every project but only existed on one, hence it was null on all other projects. We have now changed the configuration of the field to the specific project and the noise in teh log file has disappeared.
Thanks for sharing the problem and your workaround.
Do you think this is a bug?
Perhaps a workaround would be to have ScriptRunner display a warning (at the very least) if a user chooses global context for a scripted field to make them aware they may face this problem?
I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...
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!
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