It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to make JIRA custom field (Select List type or Label type) sort data in order of user selection?

Ashish Goyal Jan 18, 2016

Requirement: Create a custom field which will have pre-defined values. User selects certain values in random order, they should appear in the field as it is as per user selection (it shouldn't be sorted in alphanumerical order).

Options tried: I tried creating custom fields of type: Select List, Checkbox, Labels. I defined 4 values for each of these fields: 

  • a value
  • b value
  • c value
  • d value

Now, If I select 'd value' first and then 'b value', after saving, the order of my selection is lost and values appear in an alphabetical order (in all 3 types of custom fields). I want to retain the order in which I selected the values. Is there any configuration setting or any other solution which I can try to achieve the requirement.

Note: I am using JIRA 6.4.12

Thank you in advance.


1 answer

1 vote
Nic Brough [Adaptavist] Community Leader Jan 19, 2016

JIRA doesn't even get the selection order back from the browser, let alone have any way to store it.  Multi-select fields in html do not work that way.  In fact, you'd need to capture and recalculate on every click the user makes on a field list, and deal with them using ctrl-click and shift-click to make different selections.  It's just not there in plain html.

You will need to write a custom-field add-on that is capable of catching and storing any order set by the user.  I'd recommend moving away from the multi-select method and doing something a bit more dynamic (like the drag and drop that Atlassian use in places like setting the order of options or status in the configuration screens)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

954 views 12 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you