Forums

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

Is there any way to link a subtask with its parent in a select?

JuanMa Martinez October 20, 2022

Good afternoon,

I'd like to run a query where subtasks are listed only in case the issue that contains them has an specific value in a field.

Is there any way I can add a condition to the select to indicate that?

Thanks!

2 answers

0 votes
mauricio.groth
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.
October 21, 2022

Hi @JuanMa Martinez 

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.

With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

You can use this query to find all subtasks that have a parent which type is User Story

issue in subtasksOfParentsInQuery("type = 'User Story'")

Check out the documentation for more examples.

If you have any other questions, please contact our support. We’ll be happy to help you!
Best regards,
Maurício

0 votes
Cloudites Owner
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.
October 20, 2022

Use the ~ condition for the field where the specific value is located in your query.

JuanMa Martinez October 20, 2022

Hi, not sure if my question was clear.

We have tickets that are Sub-Task of another tickets.

So, the field Type of the sub-task = "Sub-Task", but I want to get the tickets where Type = Sub-Task  and its main ticket (the one that owns the sub-task) has type = 'User Story'

Who can we link both tickets in the query?

Thanks!

Cloudites Owner
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.
October 20, 2022

Try parentEpic IN (EPIC-123) to get all downstream issues.

Like # people like this
JuanMa Martinez October 20, 2022

Thanks, but I'm afraid that's not the solution either.

I need to list all the tickets with type = 'User Story' and all their Sub-Tasks in the same list.

As sub-tasks has type = 'Sub-Task' I don't find a way to fetch only those sub-tasks from an user story.

I'm looking for something like:

type = 'User Story' or (type = 'Sub-Task' and issue.type = 'User Story')

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events