Find all issues related, and ordered, by multiple queries

Mark Haller January 10, 2017

OK, so I've used JIRA for quite a few years now but here's a new one I don't know how to solve!

Business problem - about 40 projects, each with a few issues in them.

I want to see one list where all those issues are displayed in the correct order, based on (this is the abridged version, I've actually got a list of 12 queries/priorities):

 

First tickets in the list should be Priority = Critical

Second tickets in the list should be DueDate is this month and they have a label of "SLA"

Third tickets in the list should be Category of "Project" and (not billable and label of "additional")

Third tickets in the list should be Type = Bug

So I'll end up with maybe 300 tickets displayed, of which all the first lot are priority critical, and then the ones due this month and so on.

 

How do I do this? smile

1 answer

0 votes
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.
January 10, 2017

There's no way to sort on a list of completely arbitrary unrelated rules.  Imagine you've got a simple instruction for "sort by colour" and your list contains "Red, Blue, Cat, Yellow, Teapot".

You'll need to do some mapping (such as "all cats are black" and "all teapots are brown"), and that's going to need code.  A basic approach would be a scripted or calculated field (I say Scripted because I've always reached for the Script Runner to create such fields) that does:

if (priority = critical) return 1If (duedate = this month and label = SLA) return 2
if (category = project and (not billable and label = additional) return 3
If (issuetype = bug) return 4
<and so on>
return 99999

You'll be able to sort and search by that result automatically if you use a SR number scripted field

Mark Haller January 12, 2017

Hey Nic - thanks for the reply.

 

This sounds sensible, but the only problem would be that the view/list of issues is calculated as it loads but surely the calculated fields are only calculated every so often (how are they triggered?)

Suggest an answer

Log in or Sign up to answer