I am checking if a custom field has a certain value.
I am using JMWE
originalIssue.getAsString("customfield_23400") == "Add New Vendor"
The custom field is a dropdown.
I can also use scriptrunner if its easier.
I tried :
cfValues['My Single Select']?.value == "Some value"
and still doesn't work. I get errors.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cfValues is only for ScriptRunner, and afaik doesn't work like that. In JMWE for Jira Server, your first attempt was correct except you probably meant to use "issue", not "originalIssue" (which contains the values before the transition):
issue.getAsString("customfield_23400") == "Add New Vendor"
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.
You created a Scripted (Groovy) Validator? Can you share your whole script? Also, did you make sure that the value you're testing doesn't have a trailing space in the custom field configuration?
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.
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.