I have 2 if conditions and within them I define custom fields to update the values. However, within the second if block the following line generate a MissingPropertyException error.
CustomField uploadStatus = customFieldManager.getCustomFieldObjectByName("Upload Status");
The script failed : javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: customFieldManager for class: Script79
If I defined the above line outside of the if-block there are no errors (I can also successfully print the value). What I find odd is I have the same line defined within the first if-block which works fine.
Unsure if this is useful but I've define the following outside of the if conditions:
ComponentManager componentManager = ComponentManager.getInstance(); CustomFieldManager customFieldManager = componentManager.getCustomFieldManager();
Fairly new to this so let me know if further information is required, thanks.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
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