JQL filter issue with custom field

Sasha Pilote May 5, 2023

Hi All,

 

I have created a custom scripted field that outputs number values. the field is called rating. I created a JQL query to order the issues based on the value of this field. "project = RT1001 ORDER BY Rating DESC", this works except for my rating values that are double digits. Single digit values are being ordered highest to lowest, but my highest value "16" is ordered at the bottom with the "1" values. How can i fix this?

2 answers

2 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 5, 2023

How have you created the scripted field?

If it's with Scriptrunner and used the scripted field functions from that, then can you check that you have set it up with a number template in Scriptrunner, and changed the "searcher" to either exact number or number range.

Sasha Pilote May 5, 2023

@Nic Brough -Adaptavist- that solved it, Thanks again for the help!

 

Cheers,

Sasha

2 votes
Answer accepted
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 5, 2023

Hi @Sasha Pilote ,

Did you use a Numbers Field for your custom field or a Text Field?
This looks like it's behaving like a text field and sorting the numbers alphabetically.

Cheers,
Peter

Sasha Pilote May 5, 2023

Hi @Peter Van de Voorde ,

 

It is a numbers field for the custom field. It is scripted to take values from 2 other number fields and multiply them to get its value. Is there a way to adjust my filter to search by its actual numerical value?

 

Thanks for the help,

Sasha

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events