JIRA JQL use the group by function

Jiannan Tang April 14, 2013

Hi:

I had saw the rest api document, and JQL don't support the group by function.

But now I have to use the group by function.

What can I do, could somebody help me?

8 answers

2 accepted

6 votes
Answer accepted
Faisal
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 14, 2013

Hi Jiannan,

Apparently JIRA JQL doesn't have the "Group by" syntax at the current moment. I did a quick check on this, and there's an existing feature request which the resolution had been set to Won't Fix:
- https://jira.atlassian.com/browse/JRA-23516

And since you require the Group by syntax to perform searches in JIRA, then perhaps you may try to write a custom JQL function. Reference documentation on this topic can be accessed from the link below:
- https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Adding+a+JQL+Function+to+JIRA

I hope that this will help.

Thanks.

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.
April 17, 2013

And modify code to enable functions to use it.

Like Kara Sanders likes this
Jiannan Tang April 17, 2013

Thanks, seems I have to extend the JQL.

Karthik Sekar October 29, 2020

Above link doesn't work - can anyone please help? I know its been years...

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.
October 30, 2020

It's moved to https://developer.atlassian.com/server/jira/platform/adding-a-jql-function-to-jira/

Although I should point out again that it's the wrong place to look.  JQL returns a list of issues, it does not tell whatever is displaying the list how to behave beyond a simple order (and most reports don't care about the order either)

Karthik Sekar October 30, 2020

Thanks for the updates.

My question is simple - JQL has a 'order by' feature but not 'group by' feature - Is there any other way or work around to implement 'group by' feature in JQL/JIRA Issues filter / search feature to get the list of issues grouped by 'X'

Thanks 

Like Ulf Schmidt likes this
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.
October 30, 2020

No, because it's useless. Please have a look at the good questions @[deleted] is asking, and my more muddled answers to them.  I'm trying to answer it in one thread.

Karthik Sekar November 23, 2020

I won't say its useless, found out that Jira doesn't have group by feature.. 

Thx

Like Ulf Schmidt likes this
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.
November 23, 2020

Actually, it does.  In the reports where it is useful.  Try running a filter through the "filter statistic" gadget - that clearly does "group by".

The point here is not that "group by" is useless, but that it is useless as part of a query, because the query has nothing to say about how the results are portrayed.

1 vote
Answer accepted
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.
April 14, 2013

I'm not sure a "group by" is actually useful. Think of it this way - JQL is there to identify issues, not report on them. It therefore drags back a list, which is then pushed through some form of reporting. That reporting could be an issue navigator, a gadget, a chart, a greenhopper board etc etc etc. Some of them might find grouping useful. Most won't. The ones that need grouping (For example, the filter statistics) implement it internally.

There's a bit of a grey area in that JQL does have "order by", but even that is robustly ignored by a lot of reports because it's useless to them.

I think JQL is for finding issues. If you think you need "group by", I suspect you actually need to look at what you really want out of the report and what the users see? How would a group look in the issue navigator? Or a filter statistic or burn-down? (Currently, the closest you can get in the issue navigator is, well, "sort by", as that'll group your issues next to each other)

Deleted user February 15, 2019

Actually, it's very useful....because, and I'll give you an exact use case.

 

Say you want to view progress by "activites completed" in a burn-up while a story is completed, but you can't because there is no "burn-up by 'sub-task'" view. So you switch to using tasks "related to" story so that you can view completed the burn-up "by issue". 

But then, the SwimLane view for the active Sprint defaulted to "by Story", doesn't separate the "Stories" into separate visual swimlanes. 

So you look to create a filter to try to do so, and it turns out you cannot do so. because you cannot group by Story (which one would believe would or should be possible). Practically any query language include a "group by" function, in all this time, why has this never been tackled by Atlassian is beyond acceptable. 

Like # people like this
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.
February 18, 2019

Have another read of my last paragraph.  It's not that it would not be useful, but that you would have to rewrite EVERYTHING in Jira that works with the results of a search in order to show it to the users.

Deleted user October 30, 2020

Welcome to Product Development, @Nic Brough . 

How many users have to tell Atlassian it's not building what they need for that message to get across?

Not trolling you, I'm just being frank with you.

Like # people like this
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.
October 30, 2020

It doesn't matter.  The problem here is not that you want this function and Atlassian are refusing, but that you're not understanding that it is of no use in the way you've defined for it.

Let's say you create a filter for "colour in (red, green, blue) group by colour".  What does that do when you're using the filter in a filter statistics gadget?  Or for a board?  Or, or, or...

Simply put, you're asking for an ability to do something utterly useless.  The answer to most of the "what would it do in output X" is "absolutely nothing".  So why bother?

Deleted user October 30, 2020

Yes, it does matter.

 

It's very simple...incorporate the "Group By" operator in JQL.

 

It doesn't User Story...it says pretty clearly what it desired. Look at other Query Languages perform, and implement that. The fact that this thread has existed for year, people keep asking for, that's a signal. It's a signal that this is useful function.

The fact that others have implemented plugins on top of Jira to perform these sorts of functions is an indicator that this is CORE functionality that should be part of the platform.

Filtering is useful....to a point. To the point where someone feels to need to export to Excel and then create pivot tables to simulate what that operator (Group By) should do in 2020, is ridiculous.

Like # people like this
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.
October 30, 2020

Ok, so I think I have failed to explain this properly, I'll try another explanation.

I think we all know that a filter returns a pile of issues.

Where I think you're missing the point is that it really is just a pile of issues.  If you want to see this list, in any form, you have to use something that reports on that list.

Let's take just one simple report on that list - the "created vs resolved" report.  How would "group by" be represented in that?  Or a filter statistics set to look at project (and status if you're on the 2d gadget) - how would that show the "group by".

I am not saying "group by" is wrong.  I am trying to point out that it's functionally useless in the filters, because almost all of the places that use filters have zero use for it.

Could you please tell me what a simple "filter statistics" gadget would do with "group by" in its query?  And explain why in that case it should be done in the query rather than the report?

Like Tom Lister likes this
Karl Hendricks November 20, 2020

I'm new to Jira, I've often wanted to group my filters.  I'm new to my current role (BA) in a new company.  We have a large backlog I want to work though.
I've been trying to create a dashboard to help me have a nice overview the backlog.  To start with I started looking at the really old stuff (2015 and older)   Easy enough in a query.
But then I decided it would be nice to see how many issues we have per year, I can work my way through it.  
So on my dashboard I have 5 2-dimensial tables, (1 for each year)  would be nice to have this overview in 1 table.  X Axis - Issue Type, Y Axis - year.  

I have wanted to group by other things in the past but can't recall them now.  For me it is would be useful, if I'm trying to use the wrong tool for this and there is a better way it would be good to learn about those. 

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.
November 20, 2020

It's the same answer as it has been for the last 8 years (or, frankly, the last 19).

If your reporting is not working, fix it.  Jira data reflects what was recorded, not what you'd like to see.

Yes, I know that is grumpy and blunt.  But please do not take that to be an attempt to shut down a conversation or block a question.

You (and I) have a lot of data to try to report on.  If you were to take a step back and look at what you're trying to look at, would "group by irrelevant thing" tell you a lot?

Go back to the report or question - what are you really looking for here?

Karl Hendricks November 22, 2020

Thanks for the grumpy and blunt response ;) 
I'm new to Jira, having used DevOps in a previous role, I just want to break the data down into 1 simple table to help me work through it.   It is absolutely not essential and there are other ways to do it.   (but this would have been the simplest view)

Further more, Jira is on our 3rd party developers environment and I don't have access writes to add plug ins or project settings.

So, if it can't be done, fine, that's all I need to know.

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.
November 23, 2020

Not "can't be done", just "you're looking in the wrong place"

Karl Hendricks November 23, 2020

I'm a Jira amateur, where is the right place?  I've tried to explain what my problem is, what I want to see.  how do I do it?  if it's reporting, I can't see any other options in there than I have in the dashboard.  

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.
November 23, 2020

Have a look at the answer we are commenting on - "group by" done in the JQL is utterly pointless, you need to be looking at what you are reporting on.

Tamer Shaalan November 25, 2020

Hi @Nic Brough -Adaptavist- ,

I am new to Jira. I am using Jira Cloud for Scrum boards and Software projects
Here are 2 points


- I am looking for Group By because I wanted originally to group issues in the backlog visually based on certain categorizations such as short-term, mid-term, and long-term. Or maybe other categorization (Feature-request, Tech Debt, Customer-Request, ..etc.). I didn't find a native way in Jira software to do this. I have seen you replied in other threads that I can't add fields (or columns, whatever you name it) based on an attribute attached to an issue. So, I thought to do a JQL filter and group by 'label' as a workaround. Now, you tell us this is not possible as well. If you can help me in this, I would be thankful.

Update - I need to have something like this (but please don't tell me to create fake sprints, because this is short-and-dirty workaround!)

Categorized backlog.png

 

- Please try to understand customers' needs and requests. Honestly, I didn't like your blunt responses and replied in many threads. I mean it. You give customers harsh replies such as 'useless' or 'you don't need it'. Please give some respect to customers' needs. Even if we don't understand the product and you are the expert, you should help us achieve what we need, not educate us how to do work. As a product manager in enterprises for more than 10 years, I think that some responses you give are not the best you can give to customers. Don't' take it personally. I just see myself can't go silent while you jump from one thread to another shutting off customers just because they need a feature to manage their work.

Like # people like this
Tamer Shaalan November 25, 2020

@Nic Brough -Adaptavist- ,

 

I have posted a comment here 1 hour ago and it was live, but seems it has been deleted, or taken down (or at least I can't see it anymore). 

Would you please clarify?

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.
November 25, 2020

Please read the answer I gave at the top of this thread again, and don't attribute me for things that I did not say (For example, I never suggested "group by" is useless - you are ignoring the context in which I put it)

Tamer Shaalan November 25, 2020

Hi @Nic Brough -Adaptavist-

 

- I appreciate your quick responses to customers.
- By any means, there is absolutely nothing here personally targeting you. I just found myself going into rounds while I can't do what I would like to do. No offense. Nothing personal


That said, back to the question

I have read your answer 2 times and still can't find a way to do what I need to do.


Incredibly simple ask, how to categorize the backlog and show these categories visually in groups? Similar to the screenshot I attached in my previous reply.

I think it's a basic requirement, and as a new Jira admin coming from MS World, I wonder why this is not there.

We have periodic BL grooming sessions. Having issues categorized and displayed in groups is exactly what my team needs.

Is there a way to do it? If so, please tell me how

Like Teresa Lackey likes this
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.
November 25, 2020

You would need to rewrite the screens and code that renders the backlog, and bear in mind that this would destroy your ability to rank the issues.

Jan Clausnitzer January 11, 2021

Disregarding customer requirements is the first step in a company's downfall. A serious project management tool should offer advanced reporting capabilities.

Like # people like this
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 11, 2021

I suggest you re-read the conversation again.  You've missed the parts where the requirement is found to be ill-defined (because it's a guess based on experience of totally different software which is built differently), and, when explored, it's already met, just not the way the guess at a requirement was made.

Brenden Eshbach February 17, 2022

I'm sorry if I'm missing the obvious, but I still do not understand why the Group By function wouldn't be useful in JQL. How is this requirement already met? I'm trying to order by Time to Resolution, but I want the issues Grouped by Status, so how do I do this? 

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.
February 17, 2022

Yes, this conversation is getting very long, and I don't blame anyone for missing the important points.

To re-iterate:

  • Group by is useless in JQL, because JQL is only a search.  It gives you a list of issues that you can read in your display/extract/process function.
  • Group by is very useful in some things that would process and display the list of issues.  Not everywhere, but in some places.  

The point is that "group by" needs to be done by the reporting tool that is working with the list of issues returned by JQL.  Not the JQL.

Like # people like this
Deleted user February 17, 2022

I think most folks realize that @Nic Brough .

What you seem to be missing is that point that given that Atlassian named its "ONLY a search" language jQL it not only implies, but actually carries the name "Jira Query Language", which I'm sure you can appreciate alludes to something beyond "ONLY a search". 

Further, by not addressing this (and I'm sure other JQL related questions) head on, Atlassian is missing out on actually serving the customer better. Performing this within the QUERY language on the server within the Jira Core and not require reliance on external post processing is serving the customer.

The fact that early on in this thread you presented alternatives using a plugin, would indicate that this is actually an opportunity for Atlassian to ROLL this into Jira Core itself.

Why pawn this off on the USER (who's PAYING YOU for the product) when you can serve the user.

Like # people like this
Brenden Eshbach February 17, 2022

If JQL is only a search, then why does it have Order By? If order by is not actually being used, then what determines the order in which the list of random issues returned by JQL is listed? IOW, if Order By is useful in JQL for determining the order in which the issues are displayed, then Group By is just as useful and seems to be a necessary companion to Order By. 

Like # people like this
Deleted user February 17, 2022

Thank you @Brenden Eshbach .....another case in point. 


And I suspect you and I are not the only ones who have the same perspective.

At the end of the day, with so many people stating the same thing, upvoting comments myself and others have stated, that Nic continues to effectively blow it off....means he's not listening...not what I would expect from a Community Leader (sorry, gotta call it like I see it).

Nutshell: We're the customer. This isn't a house where you can't move a wall because it's load bearing. This is software, and as complex as Jira might be, software can be extended and re-engineered. IF....you cared about what the customer is saying.

Like Chiranth likes this
Brenden Eshbach February 17, 2022

In reading over the post, it seems @Nic Brough -Adaptavist-  that you are allowing your understanding of the software to become a mental block. Step past the "what would it take to implement it" and look at it from the viewpoint of "would this be a great feature". Why do you keep insisting that Group By is useless in JQL? The concept is not complicated. If the hangup is that JQL has been defined as only a search, then redefine it, and expand it beyond only a search. Based on your logic, it would seem just as plausible to say that Group By is useless in SQL, not?

Like # people like this
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.
February 17, 2022

Ok, you've both missed the point again.  I'm not sure how else to explain this again, but I'll try an analogy.

Imagine you look in the 'fridge and think "oh, we're low / out of a few things".  You jot it down as you find each item to top up or buy.  There's no use to grouping it here, you're literally just looking at pile of things.

That's what JQL gives you.  It has no use for the group by.

Then you think "oh, actually, I could make the shopping trip a lot shorter if I grouped the list by aisle, rather than pick up each item at random", so you rewrite the list, grouped by aisle and hand it to the person who's tasked with the supermarket run.

Great, that's now done your group by, but it is NOT something the JQL can do - you're using other information to do the grouping.  Even if that information can be derived from the items on the list (carrots, cauliflower and beans will be found in the vegetable aisles), it is NOT coming from your JQL.

And another try:  What do you want a group by clause to do in that list of things?  The JQL is only returning a list to another function.  What would a group by actually DO in the JQL?  What would the end user get out of it?  In the JQL I mean, NOT the thing that is displaying the results?

Deleted user February 17, 2022

@Nic Brough No. We have not missed your point. We understand what YOU are saying. We're saying YOU are incorrect that what WE (the customer) are asking for, is not needed (if it weren't needed...why would something like "First Level group by report" exist?). The fact that is is there in a very constrained form, means Atlassian recognizes it is a VALUABLE ability for the software to have. 

Our contention is, and here I'll reiterate, you're demonstrating poor community leadership by continuing to respond to the other members here as though we don't know what we're talking about despite the fact we've repeatedly demonstrated that we do.

If you took the time to listen, and consider "Perhaps I'm the one who's incorrect to think that Atlassian doesn't need to change things within JQL?", then perhaps this conversation would be more productive.

Like # people like this
Brenden Eshbach February 17, 2022

Ok, I think you missed the point. We want Group By to do the same thing as Order By in the JQL. If the JQL can't do it, make it do it. Make it tell the thing that is displaying the list how to group the results. It isn't complicated. You didn't answer this question: What is Group By doing in SQL? The customers don't care about what "thing" gets the job done. If JQL does it, fine. If the thing displaying the list needs to do it, fine. Who cares what happens under the hood. Please don't misunderstand me, I understand your analogy. However, I think you are getting overly hung up on the technical details that customers care little about. 

Like Deleted user likes this
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.
February 17, 2022

Thank you for giving me something to work with to help you understand the point you keep missing

Indeed, please look at the "first level group by report".  Now tell me how that is JQL?

You can't, because it isn't JQL.  It's something that takes a list of issues provided by JQL and groups them.  It's a report or display that does the group by.

In the report.  Not in the JQL.

That is the whole point.  You are trying to jam group by into a place where it has no use.  What use is a group by in a function that simply prepares a list of issues?  None.

What use is group by in a report (that reads a list for its output)?  Lots.  

But that's up to the report or display, not the JQL.

As for the order by - yes, some reports, some displays, and the boards all use it.  But they implement it, not the JQL.

Brenden Eshbach February 17, 2022

You still haven't explained why Order By is jammed into the JQL. What use is order by in a function that simply prepares a list of issues? None.

Like # people like this
Brenden Eshbach February 17, 2022

You are implying the list that JQL returns is unordered, but it is hard for me to wrap my mind around that. The list has to be ordered in some way, either it is ordered by the date the items were entered or ordered by id, or something. For the returned list to be truly random, something would have to randomize it. We know that is not the case because Order By is already included in the JQL (whether JQL is actually using it, who knows) then Group By is really just an extension of Order By. Order By tells whatever is reading the list for display which order to display the items in. Group By is a minor extension of Order By - it simply adjusts the ordering so as to list the items in an order different from the default order. Whether or not the report or display groups them visually is a different discussion. 

You keep replying that JQL doesn't need Group By, or that JQL doesn't have Group By, etc. The point is, the Customers want something to Group the items, when we go into a filter, or a list of issues, or where ever we use JQL, we want to be able to group some items together. Instead of A1, A2, A3, B1, B2, B3 we want to be able to choose to display the items as A1, B1, A2, B2, A3, B3 if we so desire. That is what we want. If it is technically impossible or ridiculous for JQL to accomplish that, then do it some other way. If the end result is the same, who cares if JQL is doing it or if the display is doing it? No one. Just don't keep throwing the idea out because of technical limitations. You may be 100% right, technically. But you have missed the practical point. 

Like # people like this
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.
February 17, 2022

Ok, so you're getting there.

>The list [from JQL] has to be ordered in some way

It is, it's in the order the indexing system finds it. 

>We know that is not the case because Order By is already included in the JQL 

The order by is a convenience to tell some functions that there is an order.  It doesn't matter if the JQL uses it, it's for the functions

And this is the crux:

>The point is, the Customers want something to Group the items, when we go into a filter, or a list of issues, or where ever we use JQL, we want to be able to group some items together.

Exactly.  The filter, the issue list, whereever you use JQL.  Yes, that's where the group by matters.  Not in the JQL.

The report does the grouping, not the JQL.  Even if you put the group by in the JQL, what would it do?   It wouldn't have any effect on what your user sees or gets because the JQL is not telling the user anything at all.  It's giving a list of issues to something that can then sort, group, summarise or whatever.

The output functions and JQL are two separate things.  JQL has no use for Group by.  The output functions do.

Brenden Eshbach February 17, 2022

I'll be the first to back down and say that I may have misunderstood something here. @Nic Brough -Adaptavist-  is right, Group By is essentially useless in a function that returns a list, from the standpoint that Group By is primarily visual, i.e. you put these items here and these other items over there. So perhaps there are two requests here. My request was to be able to Order By Field 1, then by Field 2, then by Field 3, etc, which ends up "grouping" items with the same value in a field. If that is already possible, please let me know how to implement it. 

For example:
Order By Due Date:

Ordered by Due Date.png

Ordered by Status, then by Due Date:
Ordered by Status then Due Date.png

Grouped By Status (visual):

Grouped By.png

Are we on the same page now? If I understand this thread, at minimum I want to be able to Order By this, then this, then this. Some folks want the visual grouping. Both would be AWESOME!!

Like Nic Brough -Adaptavist- likes this
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.
February 17, 2022

Yes, that's it!  Exactly!

I too would love to have group-by in more places than it is.  It would be useful in the issue navigator (the standard place that reports results when you "run" a filter or new JQL), the backlogs and, and, and.

Like # people like this
Brenden Eshbach February 17, 2022

I too would love to have group-by in more places than it is.  It would be useful in the issue navigator (the standard place that reports results when you "run" a filter or new JQL), the backlogs and, and, and.

I feel like saying, "You could have said so sooner, it might have avoided some confusion." :) I think most folks requesting this feature know what they want, and perhaps felt you were simply saying it was a bad idea. Bottom line is, we'd like to have group-by in more places than it is. 

Since SQL includes this in the syntax even though the list output is not changed in any way, it would seem JQL could implement it in the syntax as well, even though it only affects the rendered output in the report. Does that make sense? 

Like Nic Brough -Adaptavist- likes this
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.
February 17, 2022

You are right, I should have explained that "group by" is definitely a useful thing. 

I was focused on explaining that people are looking in the wrong place when they want to add group-by to JQL.  We don't want it in JQL, we want it added to more visualisations of lists of issues.

With SQL, I think it's important to say that just because they've got similar names (deliberately - "query language" is a very good description), doesn't mean they are the same thing beyond "how to tell a computer to find some stuff".

Yes, JQL does allow you to add "order by" clauses, but this is one of those compute/human compromises we make.  Humans instinctively grasp "order by", and it would be a bit of a pain to have to do it separately everywhere the sort order matters.  I'd take a guess that around 70% of the places that list or summarise issues find a sort order useful.   

Conversely, group-by in the query would probably only be recognised by 1% of the usage (rising to maybe 30% if it were implemented in the places you and I would like to see it - for me, that's the issue navigator and the backlog, both of which would be quite complex to code grouping for)

Your solution is also right - there's no problem saving a group-by in a JQL query, as long as it is completely clear to people that it is totally useless in the JQL itself, and only gets used in some places.  I'm not sure I'd want to have to spend a lot of support time explaining to people "yes but your group-by is irrelevant to what you're doing here"

1 vote
childnode October 28, 2013

attaching to Nic Brough's comment:

no plugin, but mostly a report does what you want: https://confluence.atlassian.com/x/EAISCw

1 vote
ankit ankit June 27, 2013

One of the use case can be where you have to group your issues by milestones and to report on milestone resolution. Since, we cant do group by, I am planning to play in the java.

0 votes
Lara Krefski March 3, 2022

I'm running a query to use on my dashboard in the Filter Results gadget. My query gets me all issues and sub-tasks assigned to me. However, I want to be able to see the list ordered by issue and then list the sub-tasks under it in descending order by due date. Here is what it would look like.

Issue MT-1 (due date is 3/20/22)

  • Sub-task MT-2 (Parent ticket is MT-1) due date is 3/8/22
  • Sub-task MT-4 (Parent ticket is MT-1) due date is 3/10/22
  • Sub-task MT-3 (Parent ticket is MT-1) due date is 3/15/22

Issue MT-5 (due date is 3/25/22)

  • Sub-task MT-6 (Parent ticket is MT-5) due date is 3/8/22
  • Sub-task MT-7 (Parent ticket is MT-5) due date is 3/12/22
  • Sub-task MT-8 (Parent ticket is MT-5) due date is 3/20/22

 

How can I achieve this? Is there some other gadget I should be using?

Thanks.

0 votes
Tom Baker July 30, 2015

 

 

0 votes
Norman Abramovitz
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 17, 2013

Since you have not described your use case, the only other 'simple' solution would be to use the rest api to pull over the issues and then load up your local database with the data and apply your query there. The are open source lightweight databases you can use to do the rest of your processing. This approach avoids modifying Jira and keeps your coding local to your environment. You might also be able to use a spreadsheet depending on what you are looking for.

I also agree with Nic at the 90% level about needing group by clauses, but I can see cross project summary reports being available as well.

0 votes
Norman Abramovitz
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 14, 2013

If you describe in more detail what you are trying to group by there may be other answers like a plugin might to do it. JQL seems to designed to keep queries looking simple to write. Since you are using a rest-api, you might be able to just access your database directly through a database web service instead.

Suggest an answer

Log in or Sign up to answer