In this code I am getting this error:
cannot find matching method cfValues in script runner
Please help fixing it
def values = cfValues('Multi Select').value
if ( values.contains('Option 1') || values.contains('Option 2') || values.contains('Option 3')) {
return true
} else {
return false
}
Hi @Nataraju Gokeda ,
welcome to the community!
If you have Jira cloud, it won't work for you, because it looks like code for server version.
Where exactly are you trying to use this code? Is this some kind of validator / condition?
If so, please, look at these articles:
Hi Hana...Yes I am using cloud version
the code is for post function....adding a sub task based on value of Multi Select Field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nataraju,
I can confirm that the following example located inside of the ScriptRunner for Jira Cloud documentation on the page here shows an example Script Console script to extract the values from a Multi Select List field.
You will be able to use this example to see how to extract the values from a Multi Select List field inside of your script in order to help create the script that you require to create a subtask when the Multi Select List field contains the option you require it to contain.
I hope this information helps.
Regards,
Kristian
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.