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.
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.
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).
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG