Can I change the order of the options in an add-on multi-select field?

Jason Graham April 17, 2017

I have a multi-select field in JIRA whose options are to be populated with values from an external API.  I've created the field via an Atlassian Connect add-on.  The synchronization process is working fine, and I can see the options being created and updated.

The problem is that I've been asked to make sure the options are displayed in alphabetical (i.e. value) order when a user begins typing or clicks the "pull-down" arrow next to the field.  Right now the options are just being appended to the bottom of the list.  Is there some way to display the options sorted by value instead of by ID?

3 answers

0 votes
Yatish Madhav
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.
September 22, 2021

Hi there - any progress or feedback on trying to order options on single or multi seleect fields? We particularly need to do so from a connect app REST API calls. Thank you in advance

0 votes
Yatish Madhav
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.
September 23, 2020

I am wondering if anyone has managed to do so? I am doing a cleanup/optimizing of the way we add and update options in the mutliple fields that we have from the Connect app. But need to be able to ensure the list is always sorted alphabetically. Thanks in advance

0 votes
i1
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2017

Just to clarify if I undestand the question correctly:

Your connect addon adds a drop down to a JIRA issue view and you need to make sure that options in the drop-down menu are sorted alphabetically. Is that correct? If that the case - can you controll the order in which options are added? 

Jason Graham April 19, 2017

Your understanding is correct except that options can be added to the list over time.

As an example, let's say this add-on is synchronizing a list of locations. We start with these:

  • London
  • New York
  • Paris

Now during an update, I find several new locations to be added:

  • Barcelona
  • Los Angeles
  • Sydney

The add-on will now use the JIRA Cloud API to create those options.  And I can certainly be sure that those three options will be added in alphabetical order.  But the final list looks like this:

  • New York
  • London
  • Paris
  • Barcelona
  • Los Angeles
  • Sydney

When what I want is this:

  • Barcelona
  • London
  • Los Angeles
  • New York
  • Paris
  • Sydney

"Normal" custom field options can be moved into whatever position is wanted via Settings -> Issues -> Custom Fields and then picking the option.  I'm trying to figure out how to do the same with an add-on's custom field.

Donald Skanes December 14, 2017

I am looking for something similar. I would like to sort versions in the releases dynamically rather than updating hundreds of projects thousands of versions manually. Have you found anything?

Jason Graham January 11, 2018

I was never able to find anything, and I haven't really looked as that particular project has come to an end.

I believe that versions are a built-in JIRA field, so you may have some other options available. My field was created by an add-on, and those are handled very differently.

Like Yatish Madhav likes this
Yatish Madhav
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.
August 7, 2020

Thanks for the post @Jason_Graham ... and the first response @i1 - I am also looking for the same thing at the moment. We have multiple select lists like Jason's populating over time and as they are added via the API, they simply load at the bottom. It is great that it is not edittable from the front end but  I think sorting would be nice even if it is a filterable select.

I also would like to do this for lisist currently populated already and not clear a list and reload all in alphbetical order (that would break things)

Please share any feeedback / progress or worka arounds for this?

Suggest an answer

Log in or Sign up to answer