JQL Trick and subtask



Hello !

I would like to get a list of issues with all subtask associated on each

Issue-1
subtask-2
subtask-3
subtask-4
Issue-6
subtask-12
subtask-32
subtask-44
Issue-61
subtask-121

I tried with the query
project = XXX AND issue in hasSubtasks() and issuetype = AAA
but I only get issuetype AAA and not subtask assiciated.

I don't know if it is possible, if yes, please tell me how.

5 answers

Does something like that work for you?

project = XXX and (issueFunction in hasSubtasks() or issuetype = Sub-task)

So you should get your wanted issues, but I fear you can not order them like you want to.

I get this message :

The JIRA server could not be contacted. This may be a temporary glitch or the server may be down.

I am sorry but I can not see any connection between your question and this message. Please make sure your server has no other severe problems.

0 vote

Fred, Can you try this?

(project = XXX AND issue in hasSubtasks() and issuetype = AAA) OR issue in parent(project = XXX AND issuetype = AAA)

Hello Jobin, sorry for the delay.

It does not work. :-(

Hey Fred, what is missing when you try this query?

on the second part "issue in parent(project = XXX AND issuetype = AAA)" I got this message "Error in the JQL Query: Expecting ')' or ',' but got '='. "

Can you try:

(project = XXX AND issue in hasSubtasks() and issuetype = AAA) OR issue in parent("project = XXX AND issuetype = AAA")

Hi Fred,

try:

project = XXX AND ((issue in hasSubtasks() and type = MAINTASKTYPE) OR issuetype = SUBTASKTYPE)

Hi Andre

thank you forthe request.

No error inthe query But I get issutype I dont' want which have no subtask.

Hi Andre

thank you forthe request.

No error inthe query But I get issutype I dont' want which have no subtask.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

71 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you