Is there JQL that will group subtasks under tasks?

I have a business group (most of them new to JIRA) that is tracking their work with tasks and subtasks.  They want to run a query that will show each task with its related subtasks grouped underneath.  They want to be able to export the results to Excel (which I expect can be done via csv).  We're using a local (server) installation of JIRA Software 7.1, and this group is currently using a "Business" project, though we're willing to change the project type (and issue types, for that matter) if that would let us do this.

I've been digging through the documentation, Answers and also Stack Overflow, but can't find any way to do this (at least not without adding plug-ins).  I've been thinking that maybe the best way to go is a calculated custom field that would return the same value for each parent + all its children, then create a filter and order the results by (first) that custom field and then (second) by issue type within that.  But maybe there's some easier way I'm overlooking?

Any guidance appreciated... thanks!

4 answers

Mike, It is fairly easy if you can filter tasks and sub tasks in your project and select the column parent id and sort by the parent id. E.g., Project='x' AND Issuetype in (Task, Sub-task) order by parent id asc.

Then you should be able to use the Export to Excel option to continue with your work.

If you have easyBI, you can eliminate the export to Excel and doing additional work on this. If you need further help, you can contact me.

Hi Guhan,

Thanks, and I tried something like that, but the result is an error message saying "Not able to sort using field 'parent'.". 

I don't believe the field "parent" will be populated for the "Task" issues (someone please correct me if I'm wrong about that).  If so, then even if this JQL wasn't throwing an error, then you still couldn't simply order by parent, because the users want to see each task followed by its subtasks in the output, and if parent is empty for all issues of type "Task", then that won't happen.

 

Mike, if the sub tasks are linked with parent using the Link issue option within the related Parent tasks, you should be able to see the parent id in search results (or you can enable the column to be visible). The name of the column may be parent link or parent id, whatever configured by your admin. But the concept is the same. If you can click on the Column option on Issues search screen, you should be able to spot the column that I am referring here.I do have SQL queries that can do the job, but it is not the best way to approach when we have options to do easily.

 

Hi Mike,

Unfortunately I don't think this is possible to achieve without add-ons or modifying JIRA beyond what's allowed by the standard admin tools (a calculated field might indeed work, but requires an add-on for the calculated field...).

If using a plugin is an option though, this can easily be done with our Structure add-on.

You would make a structure that looks something like this:

image2016-11-24 10:11:7.png

 

And the Excel export would look like this:

image2016-11-24 10:12:16.png

Any fields (columns) you added to the structure will also be exported to Excel - progress, estimates, etc.

 

Sorry for plugging our plugin when you were asking for no plugins sad but Structure really would solve this task in a few clicks. I realise this task alone might not justify the introduction of add-ons to your system, but Structure (and eazyBI, if it can solve this) can do a whole lot more than just grouping issues, and may well bring savings in time and effort in other areas.

 

Cheers,

Robert

One way to group task and sub-tasks visually in JIRA with no extra plugin is a Board (Kanban will do), with a single column.

The board query must include all desired tasks (i.e. top-level tasks and sub-taks). Then JIRA will present sub-tasks neatly nested inside their respective top-level tasks.

We are suing JIRA version 7.3.6 . This JQL statement gave me a list of all unresolved issues with the sub-tasks listed under their parents. The parents are listed in order of key - I think.

project = CC AND resolution = Unresolved ORDER BY rank ASC

I am then exporting it to Printable but I expect it works for export to csv.

I have no idea what object "rank" is, but this worked for me. Thanks!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot