how can i sort by the order of listing on my query?

example:

key in (ISSUE-2, ISSUE-1, ISSUE-3)

 

will get me an output of:

  • ISSUE-1
  • ISSUE-2
  • ISSUE-3

 

while i would like the results to be sorted this way:

  • ISSUE-2
  • ISSUE-1
  • ISSUE-3

 

is there anything i can use to do that while using JIRA for Cloud?

 

UPDATE:

As for the reason i'd like the 'key' to be in the order i've dictated:

My original need was to have the ability to sort my results by

  • "Epic link1"
    • Task within the Epic1
      • sub-tasks of the task
  • "Epic link2"
    • Task within the Epic2
      • sub-tasks of the task
  • "Epic link3"
    • Task within the Epic3
      • sub-tasks of the task

 

After I've exhausted all my googling efforts in search for a solution I've reached the point where I thought about the following steps:

 

... ORDER BY "Epic Link"

Include 'key' and 'subtasks' filed as a column and export the results.

The output gave me the sorting order I desired by stringing the key followed by it's subtasks

Now I have an array of keys in the right sorting order.

I  presume I could add an extra field to each of these issues and sort by it but that won't give me the dynamic I need since it changes everyday.

 

Any thought?

 

 

2 answers

Odd... but if that's what you want, there is probably something other than the Key that's driving the order you want. If so, include that field in the "report" and sort on it. Otherwise you can add an additional field called Order for example and sort on those values.

There is no manual moving issues up or down in the search capability. Another option would be to export the results to Excel and manipulate the order there.

0 votes

If you write an Atlassian Connect add-on then you can put entity properties on every issue that define a unique sort order. That is quite a complicated solution to the problem however: https://developer.atlassian.com/static/connect/docs/latest/modules/jira/entity-property.html

What is the invariant that dictates your sort order? It is clearly not ascending or descending order.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

27,062 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you