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
Next: Root
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
Hello All,
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
Else True
Hi @Manoj Gangwar ,
Your query should be:
'Other Software' !in cfValues['Enterprise Software']*.value
Could you give this a go and let me know how you get on?
Kind regards,
Bobby
Its showing an error for !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
https://docs.adaptavist.com/sr4js/latest/release-notes/release-7-x#groovy-3-update
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:
https://www.scriptrunnerhq.com/hapi
Kind regards,
Bobby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Thank you!
Bobby
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.