Hi @dorin gez -- Welcome to the Atlassian Community!
Depending upon any other criteria you have, I expect you can do this. You could use LookupIssues, Create Variable, and Branches to dynamically build a JQL query that is not possible with out-of-the-box Jira. And...
What problem are you trying to solve by doing that?
I realized you can mostly solve this with just JQL. The question is how do you want to access the list of sub-tasks? If you just need the list...
For example, if you use the following query and add the subtasks field to the results...
project = myProject
AND issueType = Story
AND statusCategory != Done
ORDER BY subtasks ASC
The open issues with sub-tasks will be at the top of the list and the sub-task keys will be shown in the results.
Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events