I am trying to retrieve the value of a scripted field from a linked issue in a listener to be run when an issue is updated. I only need to read it, use it in a calculation and then update another field so I shouldn't be at risk of getting stuck in an infinite loop or something.
Here is the section that seems to be causing me problems.
def scriptField = customFieldManager.getCustomFieldObjectByName("scriptFieldName")
def scriptFieldValue = linkedIssue.getCustomFieldValue(scriptField)
I can confirm that this works if I replace the name of the field with the name of a normal custom text field but as soon as I change it to a scripted field it won't retrieve the field value.
I assume this means that there is either another way to retrieve scripted fields in listeners or I'm trying to do something that can't be done.
Any help you can give me would be great.
Hello @cta-smiles
Please see this answer as to how you can get the value of the scripted field for an issue.
Thanks so much, this really helped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.