How can I filter on parent item type?

Wayne Erfling December 8, 2019

How can I filter on parent item type?

In our system we have DEV sub-tasks under Support Tickets and DEV sub-tasks under stories.

So I want to write the following:

   WHERE ParentType IN ("Support Ticket")

but I don't think I can.

Or can I?

3 answers

2 votes
Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 9, 2019

Hi Wayne, sadly this cannoy be achieved using native functionality. You need to go for a third-party instead. Using i.e. JQL Booster Pack you can type the following:

 

Search for subtasks created under Stories or Support Tickets:

issue IN subtasksOf("type IN (Story, 'Support Tickets')")

 

Search for Support Tickets with Subtasks

type = "Support Tickets" AND issue IN hasSubtasks()

 

Serch for closed subtasks created under 'In Progress' Stories:

status = Closed AND issue IN subtasksOf("type = Story AND status = 'In Progress'")

 

Serch for Stories or Support Tickets with unresolved subtasks:

type IN (Story, "Support Ticket") AND issue IN parentsOf("resolution IS EMPTY")

 

References:

 

Don't hesitate to ask for help if you need to create complex queries,

Regards

1 vote
Muhammad Ramzan(Atlassian Certified Master)
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.
December 9, 2019

You can achieve this using third party plugins like scriptrunner or  JQL Search Extensions for Jira & reports.

 

I am using  JQL Search Extensions for Jira & reports. and following query can help you 

issue in subtaskOf("issueType = 'Support Ticket'")

 

Reference:

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/30497099/JQL+Reference+Server#JQLReference(Server)-ParentOf(jql-query)

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2019

Hello @Wayne Erfling 

It's not possible out of the box. But with an addon like scriptrunner you can achieve that. There is a jql function parentOf.

I think this feature can fit your requirement. Or you can also use subtaskOf (from scriptrunner too)

 

Hope this helps.

Polina Semykina December 19, 2023

Thx

Suggest an answer

Log in or Sign up to answer