Forums

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

Why is ORDER BY considering 27 lower than 3?

Jon_Fister August 19, 2019

I'm using ORDER BY on a custom field which contains a number to a few decimal places. For some reason it considered 27.xxx to be lower than 3. I think I know why (it counts 27 as 2.7), but why does it do that? Is there a workaround for it?

I'm using this custom field to do prioritisation so 27 being under 3 is a big deal for me.

Here is the JQL:
project = x AND "Calculated Priority" is not EMPTY ORDER BY "Calculated Priority" DESC

 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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 19, 2019

What type of field is the "calculated priority"?  Text, number, select etc?

Jon_Fister August 19, 2019

Seems like a text field (single line). Didn't realise (I didn't create it).

I assume that's why it's out of order, is there a way to convert it to a number field?

Nic Brough -Adaptavist-
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 19, 2019

Yes, if it's text, it'll be sorting by alphanumerics instead of numbers.

You can't convert it, you'll need to add a new one and update whatever is populating it.

Like Jon_Fister likes this
Jon_Fister August 19, 2019

Thanks, at least it's a field that based on calculations from other fields so I won't have to export/reimport data to get my information back.

Suggest an answer

Log in or Sign up to answer