You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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,
Just stumbled upon this older question.
cfValuesis 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'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.