Jira Issues Macro not honoring filter sort order

Rick Crow
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 30, 2013

It seems that inserting a group of Jira issues in a Confluence page using the Jira Issues macro isn't honoring the underlying filter's sort order. I've attempted to address this through the use of Bob Swift's great Table-Plus macro (why aren't those capabilities baked into Confluence??!!) ... but my attempts to specify a default sort column in that way have also failed.

Anybody run into this before? Any help is greatly appreciated.

8 answers

2 accepted

17 votes
Answer accepted
John Danis May 23, 2019

If anyone is still having this problem I stumbled on something that worked for me. Created a custom filter in Jira including the 'order by'. Then in Confluence use 'filter = "FILTERNAME" order by key asc'. Adding the 'order by' in both seems to work.

Arraaf Mochny May 29, 2020

Thank you: confirmed your workaround works for this bug

Brandon Call July 16, 2020

Thanks, this worked for me.  In my opinion, this should be the accepted answer.  For the record, don't put the single quote around the statement and make sure the field you want to sort by has the right label.  I wanted to sort by due date and had to use this:

filter = "MYFILTER" order by due ASC

Like Felix Lepa likes this
Alex Gallien July 29, 2020

Thank you John! Was smashing my head this morning trying to figure this out.

thomas.barvaux September 11, 2020

You're the best !

Like David_Bakkers likes this
Matthew Fulton September 14, 2020

Is your Confluence instance a Server or Cloud instance? I am trying to sort issues in to a Confluence Calendar and having the same issue , except that this workaround does not seem to solve the issue. Any thoughts would be greatly appreciated.

Like David_Bakkers likes this
Brandon Call September 16, 2020

I"m on Cloud.

Like David_Bakkers likes this
Nuno Santos February 17, 2021

We are cloud as well and this "workaround" works for us.

Step by step procedure:

1. Create filter in JIRA (optional: save it for future usage)

2. copy URL step1 filter URL (note: will come out as a number. example: filter=11813)

3. Add "JIRA filter" macro in Confluence

4. Paste Step 2 result in "JIRA filter" text box followed by ORDER BY sentence (example: filter="11813" ORDER BY Status DESC)

5. IMPORTANT: click "magnifying glass" icon --> required to validate step 4 sentence

6. Click "Insert" button

7. Confirm results in Confluence by updating page 

Like _mwk likes this
0 votes
Answer accepted
Rick Crow
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.
November 5, 2013

I believe what I've run into is simply a problem with the versino of the Jira Macro plugin we're currently using. Until we update to the latest version of Confluence, however, we're not able to update the macro plugin. I'll call this answered for now and am hopeful that once we complete the necessary upgrades, the problem will be resolved.

5 votes
delisa simonovic January 29, 2015

You can use JQL directly in JIRA filter macro.

Haran Rasalingam August 22, 2016

I also encountered the same problem with ORDER BY in a filter being ignored, but using JQL directly in the JIRA filter macro worked just fine. Thanks Delisa!

Matt Lyons March 28, 2018

Thanks that works. I only used a filter in there because that's what the suggested text is and then I find out it ignores the order by clause. Infuriating. Now I've copied the filter query in directly it is ordering.

Damon Gaylor September 4, 2018

Still not working for me.  It does not honor the sort even when using jql.

project = UTH AND issuetype in (Bug, Commissions, Story, Task) AND resolution = Unresolved ORDER BY rank asc

Vikash Kumar October 11, 2018

its an issue for me too. The query I am using is -

project = "ZRB" AND fixVersion is not EMPTY ORDER BY fixVersion DESC

the list in JIRA has the issues ordered in descending. But when this is made a JIRA Chart in confluence, its sorting in ascending and not descending. Any idea how do I get the chart in confluence displayed in descending order?

David_Bakkers
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.
April 8, 2020

I've just encountered the issue of the Jira Issues table in Confluence not obeying the column sort order reliably when clicking the sort arrows too.

I was able to pre-sort the table by the column I wanted by adding the required "order by XYZ desc / asc" to the JQL, but then I found that when I tried to sort the columns of the resulting table by clicking the up/down arrows in the table headers, the JQL query broke and Jira sent back an error.

Urrggh, it seems clicking the sort arrows tacks on the "order by XYZ desc / asc" to the JQL request, so if there's already that in the JQL, the double-up isn't accepted by Jira.

4 votes
JB July 13, 2018

Same issue, same complaint.

We've created filters with sort orders that are used through out our organization, so that when we change or adjust a filter everyone gets the benefit without needing to edit / change a bunch of separate JQL.

When using those filters, we need to just say  "filter=foobar".

We then need any use of those filters to honor the entire filter instead of only a portion of it, otherwise it significantly devalues the benefit of using filters.

3 votes
Lachlan Yates July 23, 2018

LIke others above 

Same Issue, Same Complain.

It would be nice to define a filter and then use that filter multiple times. That's kind of the point of filters. 

This seems like a pretty stupid bug to still have

marleen.kluijver@nl.abnamro.com December 19, 2018

Please could you fix this!!!!

James Tuttle December 19, 2018

Just ran into this today too.  Glad (?) to see I'm not the only one having this trouble today, marleen.kluijver@nl.abnamro.com!

Since this has been open for 5 years, I guess it's not getting fixed today either...

1 vote
Graham Martin December 31, 2015

It has been nearly three years and this issue appears to still be broken.  The suggestion in the above comments is that we go to a closed ticket in whose comments a plugin vendor offers a solution we have to pay for.  

Controlling the default sort of any table or report is one of the most basic functions possible.  Why is this still not fixed? 

Mario Pinelis February 28, 2018

2018 and this issue still hasn't been addressed.  How is that possible?  Its such a basic property.  I prefer to not use a JQL query.  I have saved filters that are shared among Confluence and Kanban boards.

Jimmy May 2, 2018

I also have a filter in Jira written in JQL that contains custom field criteria, and ORDER BY statement, and also custom filter columns.

When the filter gets embedded in my confluence page, I lose the custom filter columns and the ORDER BY property. 

I can work around the custom filter columns by manually selecting the columns to display (interestingly, the column names are displayed in their multilingual translation that I translated), but there doesn't seem to be a way to set the default sorting. Currently I have to teach my users to manually click on the sorting twice to get the proper descending sort.

Would be great if the embedded filter would simply honour the original JIRA sort properties and custom columns.

Jimmy May 2, 2018

Just found out that I can paste the JQL directly in the macro instead of the ?filter=xxx and it works.

Not as clean as being able to just reference the filter number though, because, of course, if I change the filter criteria I need to update the JQL in the macro again.

1 vote
Nick Spacek October 20, 2014

I'd like to log a new Improvement request. The latest version of Confluence allows to you sort the table after the fact, but still does not respect the filter's ordering when defined. Seems to me like when I'm creating a document I am doing so to define the way I want data displayed to recipients, and if they have to interact with the document in order to see the information in the way I wanted to display it, something is missing.

Created an improvement request here: https://jira.atlassian.com/browse/CONF-35323

Pawel Brzeminski November 15, 2014

I would love to see that feature as well.

marleen.kluijver@nl.abnamro.com December 19, 2018

I would love to see this, Ordering is not working in confluence for the Macro Filter from Jira

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2013

Hi Rick,

Does the query you use in the Jira Issues Macro contain an Order by statement?

Could you copy and paste it here please?

Best regards,

Peter

Rick Crow
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 30, 2013

Peter,

Here's the query:

project = "PTM Rewrite" AND "PTM Subteam" = Claims ORDER BY due ASC

Sort works fine in the issue navigator.

Thanks,

Rick

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2013

Thank you Rick,

That query would indeed return the correctly sorted results.

But seems you've run into the following problem :https://jira.atlassian.com/browse/CONF-30114

If you take a look at the comments you might find a solution.

Best regards,

Peter

Rick Crow
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 30, 2013

Peter,

Thanks for the suggesion ... unfortunately I had already found and implemented Bob's post to no avail regarding sorting ... sounds like I should reply to that post and see if he has any direction.

Regards,

Rick

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2013

Then I can only wish you good luck.

Best regards,

Peter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events