Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Order by the same ticket order as shown in the "IN" clause

Hello,

 

I have a JQL that has an "IN" clause which contains a list of jira tickets IDs. I want to show this list of returned jira tickets in the same order as listed in the "IN" clause. Here's the JQL script:

id in (PENNY-2852, PENNY-2853, PENNY-2854, PENNY-2855, PENNY-2856, PENNY-2857, PENNY-2858, PENNY-2860, PENNY-2861, PENNY-2862, PENNY-2863, PENNY-2864, PENNY-2865, PENNY-2866, PENNY-2867, PENNY-2868, PENNY-2872, PENNY-2873,PENNY-2898,PENNY-2896,PENNY-2897,PENNY-2913,PENNY-2912,PENNY-2935,PENNY-2911,PENNY-2934,PENNY-2915,PENNY-2933,PENNY-2914) "

 

ORDER by key does not help much as the tickets could be created in any random order but the order mentioned in the "IN" clause should be maintained. How can I achieve that?

1 answer

0 votes

There's no way to do that.  Your "in" clause has nothing to do with ordering.

You'll need to look at other data on the issues for your sort.

Why tickets are not ordered by the same order sent in the "in" clause should not be the case? Any suggested workarounds?

Why would they be? 

A question asking for a list of issues is one thing.  How you display it (including the sort order if one even applies in your result report) is another thing.

You'll need to look at something else to do the ordering.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

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