In a structure, i would like to query the value of a sub task and see the associated main story

Yaron Klein
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2022

Hi,
Thanks in advance for the help of the community! 
I have stories with sub tasks. The sub tasks have affected versions assigned to them.
I am trying to use a structure and to get all the stories that have sub tasks with affected version.

When I run the following query:
'Project = "AAA" and  affectedVersion != Empty ORDER BY Rank Asc'
It seems that it query only on the story level.
I tried to use the extender for the sub tasks, but this doesn't solve the problem as it seems that it is not part of the query.

When I run the following query:
'project = "AAA" and issuetype = Sub-task and affectedVersion != Empty ORDER BY Rank Asc'
I get a list of sub tasks with affected version without their parents.

Anyone know how I can write a JQL query that will query the sub tasks and will return the entire hierarchy above them (story and epic).

Thanks a lot,
Yaron

1 answer

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.
November 3, 2022

Hi @Yaron Klein 

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 the parents of your sub-tasks that contain these values 

issue in parentsOfSubtasksInQuery("project = "AAA" and issuetype = 'Sub-task' and affectedVersion != Empty ORDER BY Rank Asc")

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

Yaron Klein
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2022

Thank you Maurice.
I will check it, however we already have a search query extension - Script Runner Enhance Search, so I will check if it does the work.
Thanks,
Yaron

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events