Sorting on two fields one of which is the Rank field

Hi,

I am using JIRA + Greenhopper OnDemand. I am having a strange problem that I can't understand. Here is my setup:

2 projects: Imported and New. Imported was created out of an import from a CSV file and has a custom number field called custom_rank (its a relative number where the lower the number, the higher the priority). New was created as a new jira project. Global ranking is enabled.

My goal: Have a common backlog query across old and new projects which is sorted by priority. I want to do a primary sorting using the system Rank field in JIRA and a secondary sorting using the custom_rank field in the Imported project (since I do not want to lose the prioritization in the Imported project which is based on the custom rank).

Here is my overly simplified JQL:

status = Open ORDER BY Rank, custom_rank ASC

But this does not give my the desired results. The issues in the Imported project are not ranked at all by custom rank and are in an order that does not make sense. However when I do:

project = Imported AND status = Open ORDER BY custom_rank ASC

this works absolutely fine and I can see that my original prioritization by custom_rank is respected.

Is there a known issue when the Rank field is used along with a custom field in an order by clause? Could it be that the import wizard assigns random rank numbers to the imported issues and not the same rank to all of them?

Any help is greatly appreciated!

1 answer

1 accepted

0 vote
Timothy Chin Community Champion Jun 23, 2013

I want to do a primary sorting using the system Rank field in JIRA and a secondary sorting using the custom_rank field in the Imported project

You have a fundamental error here. It's impossible to sort your issues because your issues does not use the same field to sort against. You should either fill in all your issues with custom_rank or remove it and use the priority field.

Could it be that the import wizard assigns random rank numbers to the imported issues and not the same rank to all of them?

The numbers are not random and are not unique.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

159 views 1 17
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