How to work with Select List (Multiple choices) custom field and Assets custom fields to retrieve matching objects.
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Purpose
This article provides instructions on how to create an Assets custom field that retrieves objects matching a Select List (Multiple choices) custom field.
Suppose we have an Assets object with the following attribute:
We also have a Select List (Multiple choices) custom field, listing the same set of values present in the Assets attribute:
We want the following behavior, when more than one option is selected, all objects matching those values are returned:
After selecting values in the "Select List" (multiple choices), the "Assets" custom field will return the objects that match the selected value(s).
Solution
1. Take note of the Select List (Multiple choices) custom field ID - How to find any custom field's IDs. (In the below example, the custom field ID is 10026)
2. Create an Assets custom field and configure this as your use case.
3. On the "Filter Issue Scope (AQL)" field use the following syntax:
"<Assets_Atrribute>" IN (${customfield_XXXXX.name${0}})
Replace the <Assets_Atrribute> with the attribute name and XXXXX with the Select List (Multiple choices) custom field ID.