Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get subtask to return with parent issue in issue search

Jason Herbolsheimer February 18, 2019

We use subtasks to identify all the work that needs to be done for a particular issue.  But when I do a search all I can get back in the results are the parent issues.  What I would like to do is get back the subtasks in the results rather than the just the parent issue.  Hopefully there is some JQL that I could use to get these subtasks (and details) in the results.

2 answers

0 votes
Alexey Matveev
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 18, 2019

Hello,

@Brittany Wispell gave you an example with the ScriptRunner add-on. There are other add-ons with the same functionality.

For example, Power Scripts, Jtricks or JQL Extensions for Jira.

If you want to use the Power Scripts add-on, your query would look like this:

key in subtasksOf("project = XXX AND issuetype = Task AND status = Closed")

You can find more info here:

https://confluence.cprime.io/display/JJUPIN/Pre-defined+JQL+functions#Pre-definedJQLfunctions-subtasksOf

I believe that your requirements can not be fulfilled out of the box.

Brittany Wispell
Community Champion
February 18, 2019

Nice catch @Alexey Matveev 

I use it so much it seems to me like normal functionality now! 

Thank you!

0 votes
Brittany Wispell
Community Champion
February 18, 2019

Hey @Jason Herbolsheimer 

Try using something like the below JQL. 

issueFunction in subtasksOf("project = XXX AND issuetype = Task AND status = Closed")

 Let me know if you have any other questions or issues with this JQL. 

Thanks! 

Jason Herbolsheimer February 18, 2019

Thanks Brittany.  I probably should have mentioned that I'm using the 'cloud' version.  From what I can tell "issueFunction" is not available to me.

Jason Herbolsheimer February 18, 2019

Here is what I have that is giving me back the parent issues only.
"Epic Link" = HR-1111 AND status not in (Done, Canceled) AND project = HomeRun

Brittany Wispell
Community Champion
February 18, 2019

Since you are using Cloud, the solution will require an add-on since this functionality is not OOB.  @Alexey Matveev suggested PowerScripts which will provide the solution you are looking for. And another good add-on is ScriptRunner which is the first suggestion I made. 

Sorry for the confusion! 

If you have any other questions let me know.

Suggest an answer

Log in or Sign up to answer