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
Currently, I am using the below condition to transition the issue to next status but the field which we have is a multi-select field.
cfValues['Enterprise Software']*.value != 'Other Software'
cfValues['Enterprise Software']*.value contains none of 'Other Software'
So, if we select two values in the multi-select field like-
Value in (Other Software, New Software) then condition should be false.
If value = Other Software then False
This must be because you are on a fairly older version of ScriptRunner. The !in operator was added as part of the Groovy upgrade with release v7 of ScriptRunner:
With an older version of ScriptRunner, you can instead use this query:
!(cfValues['Enterprise Software']*.value).contains('Other Software')
However, I would always recommend looking to upgrade ScriptRunner when you can, there are a significant amount of upgrades for you to be able to take advantage of, one of the most significant being HAPI:
Thanks for the quick resolution. We have a planned upgrade of Jira and Plugins.
It works now as expected.
One more thing I want to run this Post function as a User = 'JSM User' but currently its running as a Default user and there is no option to change in in UI. Could you please suggest the script?
Currently using the Built-in Fast track Post Function there is no way for you to define the user who performs this action.
Instead, what you would have to do it write a custom scripted Post Function. Is this script you can perform the same action (check the custom field doesn't include Other Software, and if it doesn't, transition the issue to another status) however, as you are writing a custom script using the Java API, you should be able to change the user who performs this action in the code.
Your feedback is really useful though, and I will be sure to get this back to the product team.