Hi All,
How to add two custom field(single select) values in single cfValues script ??
I'm trying to create a two sub tasks automatically when parent issue is created based on custom field values selection.
we have a custom field(single select list) called "Test" it has options A, B, C, and D and i want put a condition that if user selects either B or C while creating parent issues it has to create sub-tasks automatically. If user selects option D or A sub-tasks should not create.
I've added Create sub-task(Script runner) post function and added below condition
cfValues['Test']?.value == 'B'
cfValues['Test']?.value == 'c'
Sub-tasks are creating only when option B is selected. I want to add both values B & C in single line.
I've tried with below script it is not working:
cfValues['Test']?.value == 'B, C'
Any help??
Thanks in Advance,
Bunty
Hi
Did you try to use getValue() method?
I use such code in transition validator, try something similar in post function
result=true
if (cfValues['<selectListCustomField>'].getValue() == "Yes") {
result=false;
}
return result;
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.