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.
Manage Confluence like never before! This new learning path teaches you how to manage content, users, and permissions while optimizing user experience. Built for admins at all levels who want to confidently lead and unlock more innovative collaboration.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.