I have a list of tasks. Some have sub-tasks. How do I list all tasks omitting the parent tasks? For example:
assignee = currentUser() AND (IS NOT parent)
To summarize the (above) discussion, what I want can't easily be done with the Jira queries at present.
It looks like a combination of the following two queries could accomplish what I want:
Thank you to @Jack Brickey and @Nic Brough -Adaptavist- for your help on this!
assignee = currentUser and issuetype in subTaskIssueTypes()
should do the trick. Strictly, it's not what you're really asking, but it will give you the right answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And if you happen to want to include issues without subtasks…
assignee = currentUser and (issuetype in subTaskIssueTypes() OR issueLinkType is EMPTY)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Jack!
Getting closer.
Here is the query I'm currently using. It still seems to be missing my top-level stories
assignee = currentUser() and (issuetype in subTaskIssueTypes() OR issueLinkType = EMPTY) AND resolution = Unresolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unsure why story 2 would be assigned to you if no action required by you. But that is a horse of a different color.
In any event, you could not achieve the goal with native JQL. Maybe Scriptrunner and Nic can likely assist there if SR is an option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(Sorry, I'm trying to edit my replies so the threads make sense. I think I'm just making a mess of it)
My issue is a bit more complicated than the example. Story 2 is assigned to and there are many subtasks assigned to multiple people. I still need to herd the cats, but want a query for the times when I just need to look at my action items
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nic and Jack, you've got me on the right track. I think. I've found the following documentation and I hope I can find the query fields I want.
https://support.atlassian.com/jira-work-management/docs/advanced-search-reference-jql-fields/
I'll post a solution to my own question when I find it (hopefully).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmm... I'm having problems with issueLinkType. There seem to be outstanding bugs
issueLinkType = EMPTY is not working the way I think it should (to find an issue without a subtask) or I am misunderstanding something.
The following ticket seems to indicate problems finding issues without subtasks:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ugh…. My bad @Jeff Shepherd I have totally gone astray here while answering multiple questions. IssueLinkType is for links not sub-tasks. 😖
my sincere apologies!
You can leverage "Parent Link" is empty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can find my subtasks with (issuetype in subTaskIssueTypes()).
What I need now is to find my issues without subtasks.
Parent seems to be a search that helps find a subtask.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean you need a clause like "issue has no sub-tasks"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I was quite blunt there, I was trying to avoid an if/then/else essay that you only needed about 5% of!
There isn't a simple way to do this in Jira server I'm afraid. You need one of the apps that can provide advanced JQL (functions usually). Or something that can do "count sub-tasks" as though it's a field, so you can then use a clause like "and this issues subtask count is empty or 0"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is this request you may wish to vote/watch - JRACLOUD-67108
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No offense taken. The exclamation was excitement, not irritation.
While I'd rather have a "here is your solution" answer, an "it can't be done" is an answer too. At least I'm not left hanging.
Thank you for your attention to my question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.