If Statement in Jira Automation for Multiselect Field

Drew Carrington July 23, 2021

Hello!

Is there a sort of count() feature available in Jira when creating an automated rule for a multiselect field? 

 

For context, we have a field for locations. If the ticket author only selects 1 location, we want a unique comment to be added, but if it's more than 1 (or doesn't equal 1) we want a different message. However, I haven't been able to find any type of information around counts.

 

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2021

Hi @Drew Carrington  -- Welcome to the Atlassian Community!

Your multiselect field is a list field, and so you may use {{issue.myfield.size}} to get the count of selected items in an automation rule.  Please see this documentation for more information:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/#Smartvalueslists-list.size

If the field could be empty (none selected) please consider adding a default value as well:

{{issue.myfield.size|0}}

Best regards,
Bill

Suggest an answer

Log in or Sign up to answer