Hi,
I am a complete newbie when it comes to scripts so my apologies if this something stupid
I'm trying to increase the value of a Number Field by using the 'Increase value of field (JMWE add-on)' post-function. I only want to do this when another Single-Select Field (Pushback Tracker) has the value 'Yes' selected so I have inserted the following code in the Condition field of the Post Function
def passesCondition = false
if (cfValues['Pushback Tracker']?.value == 'Yes') {
passesCondition = true
}
return passesCondition
Unfortunately it doesn't seem to work and when I test it using the 'Test Groovy Script...' button I get the error message below. Can anyone help? I know it's probably something stupid, but this code worked in a different post-function and I don't understand why it's not working here.
There was an error during the execution of your script
groovy.lang.MissingPropertyException: No such property: cfValues for class: script1520588315893414083605
I encourage you to read the JMWE documentation, which explains all this in details. For example, to figure out how to access fields of an issue, refer to: https://innovalog.atlassian.net/wiki/x/dgDBBg
In your case, the script could be:
issue.getAsString("Pushback Tracker") == "Yes"
Thanks for your help, this worked. I had been looking at the wrong documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.