Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

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,

1 answer

0 votes
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.
Nov 03, 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,

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.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events