Create a custom report that displays tasks / sub-tasks

Cary Lewis February 20, 2015

I want to be able to export a list of JIRA issues (stories, tasks, etc.) and their sub-tasks. Is there a way to do that with JQL?

If not, is there a way to do this with an API.

Often times there is an important sub-task that needs visibility in the reports I want to generate - information that its parent task simply doesn't have. I know I could convert a sub-task to a task, but I don't want to have to do that.

2 answers

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2019

With the Better PDF Exporter app, you can export top-level issues and sub-tasks with a couple of clicks. What goes to the document and how is totally customizable.

41b03580-86af-4eb4-8c1a-dd0182812c73

1 vote
philleicht
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.
February 20, 2015

Hey Cary,

according to your labels you are on JIRA Cloud which would slash out my initial suggestion to use the Script Runner plugin that offers JQL functions like hasSubtask() or subtaskOf() (as described in this documentation).

However, maybe I'm thinking too complex here.

If you only want to list your tasks, stories and subtasks etc. you can simply select the issue types you want to list in your basic search or use "issuetype in (type1, type2, type3)" in JQL instead.
To get a nice sorting where subtasks are listed below their maintask, try the following JQL (entering the issue types you want to be included):

project = "Your Project" and issuetype in (Task, Sub-task) ORDER BY Rank

One thing of consideration though: The custom field "Rank" comes with JIRA Agile; If you don't have this installed, this JQL might not work for you. As I usually go this root (and JIRA Agile is quite often installed) we might have to figure out something else to sort by for you.

If you provide further information I'll be glad to find a way that works best for you.

Regards,
Philipp

 

Bonnie Snipes April 17, 2015

Once you have results from any query, you can export them by clicking the export drop down menu near the top right corner of the screen. They have a multitude of different export options there (which is great because it seems not too long ago, you could only export an XML file).

cfell January 3, 2019

Queries / reports for sub-tasks still does not work. Is this a huge flaw or am I 'using it wrong' ? e.g. 

project = MY_PROJECT AND "Epic Link" != MINE-100 AND Status != Done AND Status != Resolved AND IssueType in (Task, Sub-task)  ORDER BY Created ASC, key DESC

Like Richard Gunther likes this

Suggest an answer

Log in or Sign up to answer