Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with sorting by single-choice custom field

solncevavv March 4, 2019

Hello!

I have a problem with sorting by single-choice custom field. I use this JQL-query in filter:

project = NPA AND issuetype = "Проект НПА" AND (Разработчики = "Минэнерго России" OR "Разработчики (расш.)" ~ Минэнерго) AND "Разработчики (доп. инфо)" ~ "09" AND status not in (Отклонено, "НПА Завис", Архив) ORDER BY Стадия ASC

Стадия is a single-choice custom field with options on russian. 

Sorting doesn't work

 

1 answer

0 votes
Hector
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.
March 4, 2019

Hi @solncevavv , 

May I ask if "Стадия" is a select field? I believe it is, so Order by would be by default based on the order you defined its options (note you can sort alphabetically when you edit the list of options in Jira if needed).

Let me know if it helps.

solncevavv March 4, 2019

Hi @Hector 

Yes, "Стадия" is select field (single-choice). Yes, I know this. But the problem is that sorting doesn't work. For example, we have options Alfa, Beta, Gamma and some issues as a result-set. And if I use "ORDER BY Стадия ASC" clause I get as a results something like this:

Alpha

Alpha

Alpha

Beta

Alpha

Beta

Beta

Gamma

Gamma

Beta 

Hector
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.
March 4, 2019

What jira version are you using?

Do you get the same result querying it via REST API? Just need to find what is your custom field ID. Example as follows:

https://jira.company.com/rest/api/2/search?jql=project=XX+ORDER+BY+cf[12740]+ASC&fields=key,summary,customfield_12740

If the result is the same then, I suggest opening a support ticket on Atlassian so the team can support you on the matter, maybe there is a glitch somewhere.

Regards,

solncevavv March 5, 2019

REST API Result is the same. I've opened support ticket. Now I'm waiting for results

Like Hector likes this
Louise Baker
Contributor
February 23, 2023

Did you ever get a reply on this? I'm running into the same issue

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events