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:
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:
I hope that this will help.
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)
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.
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)
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.
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?
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.
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?
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.
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?
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.
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!)
- 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.
- 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
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.
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.
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.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event