JQL query to return issues with multiple values in a multiselect

jllange February 8, 2017

I have a multiselect custom field called "Reporting Customer"  I would like to search JIRA for issues that have been reported by more than one customer.

2 answers

0 votes
Dayanand October 12, 2021

any updates on this request like any JQL which results more than one value issues with the multi-choice field.

0 votes
Deleted user February 8, 2017

I think it will be only possible by creating a calculated field (provided by ScriptRunner) and using the below code to store the count from multiselect picklist field:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.fields.CustomField
 
CustomField multiCustomerField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("<Name_of_multiselect>")
if (multiCustomerField == null)
	return "custom field not found"
return "" + ((ArrayList) multiCustomerField.getValue(issue)).size()

Then the below JQL query can be used to show issues with multiple values in multiselect

project = "ProjectName" AND <CalculatedFieldName> >= 2

Suggest an answer

Log in or Sign up to answer