Hello,
I am using the below script to set value of a multiselect field based on a value of single select field, but this is not working.
Country Relevance is a multiselect field.
Retrofit Type is a single select field.
const retrotype = getFieldById("customfield_10471");
const countryrel = getFieldById("customfield_10091");
logger.info('Value: ' + retrotype.getValue().value);
if (retrotype.getValue().value == 'PQ Testing') {
countryrel.setValue('US');
}
I need to set value of a multiselect field Country Relevance = US if Single Select field Retrofit Type = PQ testing
Hi @Amzad Khan ,
It is possible by using behaviors in the ScriptRunner plugin.
https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview
Script:
const retrotype = getFieldById("customfield_10471");
const countryrel = getFieldById("customfield_10091");
console.log(retrotype.getValue().name)
switch (retrotype.getValue().name) {
case "PQ testing":
countryrel.setValue("US")
break;
default:
break;
}
Regards,
Geethanjali
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.