Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Servicedesk Scriptrunner behaviour when using a multiselect field

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...

 Jira 7.12, Scriptrunner 5.5.9, server install

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

340 views 0 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you