Hi,
I have multiple declarations pulling in numeric values into a post-function. They all work excluding one; I am getting this error:
2023-03-23 15:13:04,837 ERROR [workflow.AbstractScriptWorkflowFunction]: Workflow script has failed on issue ABC-123 for user 'rbourg'.
View here: http://[site URL]/secure/admin/workflows/ViewWorkflowTransition.jspa?workflowMode=live&workflowName=[workflow name]=postfunctions&workflowTransition=1&highlight=26 java.lang.NullPointerException:
Cannot invoke method getValue() on null object at Script90.run(Script90.groovy:55)
Here's the variable declaration, that is written the exact same way as other variables that are working as expected.
def Datafeed = cfManager.getCustomFieldObjects(issue).findByName("Datafeeds Hours").getValue(issue) as Double
Here's what I've tried to troubleshoot this error:
1) Added a default value of 0 to ensure that the field is not null (within Jira's custom field manager).
2) Ensured that the casing and spacing of "Datafeeds Hours" is correct.
3) Added the following script to the code after the variable declaration:
if (Datafeed == null)
{
Datafeed = 0
}
As mentioned, all of the other variable declarations work as expected. Any insight as to why this is occurring?