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?
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.
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)
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.
And modify code to enable functions to use it.
Thanks, seems I have to extend the JQL.
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.
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.
attaching to Nic Brough's comment:
no plugin, but mostly a report does what you want: https://confluence.atlassian.com/x/EAISCw
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.
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.
Above link doesn't work - can anyone please help? I know its been years...
Welcome to Product Development, @[deleted].
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.
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)
Issue MT-5 (due date is 3/25/22)
How can I achieve this? Is there some other gadget I should be using?
It looks like you're new here. Sign in or register to get started.