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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL-search for sub-tasks in a parent tasks having all other sub-tasks closed Edited

Hello,

 

Is it possible to search with JQL for a sub-task where all the other sub-tasks of a parent task except the one being searched for have the status 'closed'?

 

For example, I have the following structure of issues

- Parent Task1

---Sub-task 1.1 - 'Label1' - Closed

---Sub-task 1.2 - 'Label2' - Open

---Sub-task 1.3 - 'Label3 -  Open

- Parent Task2

---Sub-task 2.1 - 'Label1' - Closed

---Sub-task 2.2 - 'Label2' - Closed

---Sub-task 2.3 - 'Label3' - Open

 

So I want to find that sub-task 2.3. Is it possible with JQL?

3 answers

1 accepted

Hi Andrey!

Just in case you are using Structure add-on and have this hierarchy as a structure, you can use S-JQL filter like

[status = Open] AND NOT (sibling of [status = Open])

Or, if you need it in a JQL statement somewhere,

issue in structure("my structure name", "[status = Open] AND NOT (sibling of [status = Open])")

Let me know if you need further help with this!

Igor

Hi Igor,

Yes we are using Structure here.

I have tried it and it works just as we need.

Thanks a lot for the help!

Andrey

Great! Happy to help. 

Igor

1 vote

It is not possible out of the box. I think you would need to write your own JQL function with Power Scripts, ScriptRunner or your own plugin.

Hello

Have you tried project = "PROJECT NAME" and type = Sub-task and resolution is EMPTY ?

this will list all open subtasks in your project.

 

If you want just the list under specific parent ticket try:

Resolution is EMPTY AND parent in (ISSUEKEY)

I need to query open subtasks where parent status is in Done.

I don thave parentsof function permission or functionality in our project.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,431 views 22 32
Read article

Community Events

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

Events near you