Forums

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

How to order query results by order of queried issues...

Phil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2022

Jira server question:

Q: I'm doing a simple query just to display a number of issues in a result list, such as:
id in (issue-1, issue-1003, issue-23, issue-546)

I'd now like the result list to display these four issues exactly in the order of the query:

1. issue-1
2. issue-1003
3. issue-23
4. issue-546

I.e. sort in the order of queried issues... any ideas how to do that?

Thanks!

 

2 answers

2 accepted

0 votes
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.
October 20, 2022

Welcome to the Atlassian Community!

There is no "order of the query" there, the issues are simply alphabetic.

If you wish to order them, you need to tell Jira what to order by.

0 votes
Answer accepted
Dirk Ronsmans
Community Champion
October 20, 2022

Hey @Phil welcome to the community!

Afaik that won't be possible. When you run a JQL Query you can order the issues but only based on the values of the returned issues.

e;g.

ORDER BY Created ASC

ORDER BY issuekey

...

Sorting them based on the input query isn't something that translates

Suggest an answer

Log in or Sign up to answer