Hello All,
we have two workflows for two issue types. Task to is to created two sub tasks when a parent issue got created based on custom feild selection.
I have added the below code in the Script Runner :-
cfValues['11906']?.value == 'Bug' || cfValues['11906']?.value == 'Enhancement'
This code is working for first issue type and not working for the second issue type. Custom Field names are different for both the issue types.
I printed the logs, from the logs i understoond that "cfValues" has customfields related to first issue type only.
2019-02-08 03:34:55,704 WARN [utils.LazyCustomFieldsMap]: Did not find requested custom field 11906 on issue MTS-1564
2019-02-08 03:34:55,711 WARN [utils.LazyCustomFieldsMap]: Did not find requested custom field 11906 on issue MTS-1564
Can you please suggest that how to get proper cfValues when second issue type's workflow gets executed.
THanks in Advance,
Bunty
Just stumbled upon this older question.
cfValues
is a map-like structure where you can get the value of any custom field on the object. Note that the keys are the field name, and not id.
You will have to access the field value by its name, the name like you will find it in the administation for custom fields in Jira.
cfValues['nameOfField'] == 'Bug' || cfValues['nameOfField'] == 'Enhancement'
try this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.