how to filter the epics with only one issue with satus "Maintenance"?
Asked by Henrique Olmo Salles:

Hi,

I have a project with 4 issue types (Epic, Sesnor, Battery and Charger) and 2 status (Available and Maintenance). Each Epic contains the other 3 issue types (ex: the Epic xxx contains one Sensor, one Battery and one Charger). I would like to create a filter to display the Epics when the following conditions are true:

1. Epic status is Maintenance (I think the JQL sould be issuetype = Epic AND status = Maintenance)
2. Sensor status is Maintenance (I think the JQL sould be issuetype = Sensor AND status = Maintenance)
3. Battery and Charger status are Available (I think the JQL sould be issuetype in (Battery, Charger) AND status = Available)

Is it possible?


Answers:
author: Charlotte Santos -Appfire-
body: **Hi [@Henrique Olmo Salles](/t5/user/viewprofilepage/user-id/5316583)**

I'm Charlotte, a support engineer at Appfire and I'm here to help you.

Unfortunately, using vanilla JQL, you'll not be able to do it dynamically.

In the app where my team works, [JQL Search Extensions for Jira](https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira-reports?hosting=cloud&tab=overview&utm_source=atlassiancommunity&utm_medium=listinglink&utm_campaign=mauricio), you can use this query to find the Epics with the conditions you want:

```
issue in epicsOfChildrenInQuery("type = Sensor AND status = Maintenance") AND status = Maintenance AND issue in epicsOfChildrenInQuery("status = Available AND issuetype in (Battery, Charger)") AND status = "Maintenance"
```

Please contact our [support](https://jqlsearchextensions.atlassian.net/servicedesk/customer/portal/2) if you have any other questions about this query.

We'll be happy to help you!

Best regards,

Charlotte


author: David Blank
body: Hi [@Henrique Olmo Salles](/t5/user/viewprofilepage/user-id/5316583) and welcome to the Atlassian Community!

You might want to add a filter for your Project to them ( like: project = yourprojecthere)but other than that these queries all look good to me! Have you tried going to "All Issues" or creating a new filter and trying it out?

comments: author: Henrique Olmo Salles
body: Hi [@David Blank](/t5/user/viewprofilepage/user-id/4116552) . Thanks for the welcoming.

I tryied this filter but got no results... I'm attaching some prints of the resolts and one exemple of the epic.

project = INV AND (issuetype = Epic AND status = Maintenance) AND (issuetype = Sensor AND status = Maintenance) AND (issuetype in (Battery, Charger) AND status = Available)

![Captura de tela 2023-09-14 122011.png](https://community.atlassian.com/t5/image/serverpage/image-id/280725i6AB3CFA575EBC788/image-size/large?v=v2&px=999 "Captura de tela 2023-09-14 122011.png")![Captura de tela 2023-09-14 122104.png](https://community.atlassian.com/t5/image/serverpage/image-id/280726iC73F3924443C7FF2/image-size/large?v=v2&px=999 "Captura de tela 2023-09-14 122104.png")


author: David Blank
body: I apologize for my misunderstanding! I was thinking you were using 3 separate queries. Unfortunately to combine the 3 queries **I think** you need an extension from the app store.

I've seen this one mentioned: [JQL Search Extensions for Jira \& reports](https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira-reports?hosting=cloud&tab=overview&utm_source=atlassiancommunity&utm_medium=listinglink&utm_campaign=muhammad&_ga=2.82556950.1431975101.1570351869-294600771.1565082059)


Tags: cloud

jira-software

jira-software-cloud

jira-work-management-cloud