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
Hi All,
Not sure what I'm doing wrong here... I need to write a behavior that will work in the customer portal of ServiceDesk, that will indicate if at least one value in a standard Jira Multiselect field has been chosen. I can check if any specific value has been selected using the many examples found on this forum, but my main goal here is to simply test if >=1 options have been chosen. Any suggestions?
This is as far as I have gotten, but no joy yet... :
def my_multisel= getFieldByName("multiselect1")
def crField = getFieldById(getFieldChanged())
def int selectedOptions = crField.size()
if (selectedOptions >= 1{
my_multisel.setError("at least 1 item selected") // just used to test
// do more stuff here in real life...
}
else
{my_multisel.clearError()}
Jira 7.12, Scriptrunner 5.5.9, server install