Dropdown showing every combo of a custom field as an option to select

Yvette Nash May 9, 2024

I have created a dropdown control based off a custom field. This custom field can have multiple values when being set on our jira issues. This is causing the dropdown options to be every combination used. How do I make the dropdown only show the individual values? Example, I only want the dropdown to show A, B, C and not [A], [A,B], [B,C], etc 

 

Thank you in advance!

1 answer

1 accepted

0 votes
Answer accepted
Inder Singh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2024

@Yvette Nash : Can you try the following SQL query in the Control edior (you would need to replace the custom field key with the one you are using):

-----

with tbl1 as
(
   SELECT EXPLODE(SPLIT(REPLACE(REPLACE(a.value, "[", ""), "]", ""), ', ')) AS Value
   FROM jira_issue_field AS a
   WHERE (a.field_key = 'customfield_12345')
   AND a.value IS NOT NULL
   GROUP BY Value
   ORDER BY Value ASC
)

select * from tbl1
GROUP BY Value

Screenshot 2024-05-09 at 1.05.28 PM.png

---------

Let us know if this works.

Thanks!

Yvette Nash May 9, 2024

It worked beautifully! Thank you so much Inder!

Like # people like this
Inder Singh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2024

Great to hear that!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events