This is based on https://answers.atlassian.com/questions/186846/jira-calculated-field-based-on-another-calculated-field (which was closed due to some blog bug)
I have a Jira custom field setup that includes several scripted fields with pieces of common logic. So, field 1 returns some number based on issue fields, field 2 returns some more info based on number in field 1 etc
As you might guess, i'm not fond of copy-pasting scripting code from one script to the other, but all my attempts to use getFieldValue to get the current value of another SCRIPTED field returned NULL/empty values. Am i missing anything?
The code is simple
Field1 (scripted field)returns constants depending on issue fields, type etc (simplified version here):
Field 2 (scripted field) looks like:
def custField = customFieldManager.getCustomFieldObjectByName("Field 1")
return issue.getCustomFieldValue(custField) // TODO: some transform
this always produced null / empty for Field 2
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....
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