Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

jql for issues in epic with certain label

David Verbeure February 15, 2024

In the new jira cloud Issuefunction doesn't exist. 
who can giv me a jql for issues in epic with certain label

5 answers

0 votes
Charlotte Santos -Appfire-
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.
February 16, 2024

Hi @David Verbeure

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, you can use this query to find issues in Epics with certain labels:

issue in childrenOfEpicsInQuery("labels = ABC") 

Please contact our support if you have any other questions about this query.

We’ll be happy to help you! 😉

0 votes
Kristian Walker _Adaptavist_
Community Champion
February 15, 2024

Hi David,

 

I can confirm to make issueFunction work in Jira Cloud, you need to use the Enhanced Search Page provided by ScriptRunner for Jira Cloud.

Once you have defined your filter on your enhanced search page, you can use it inside regular Jira in places like filters, boards and dashboards by following the steps below.

1. Save the filter and share it (This creates a copy of the filter as a standard Jira filter where we synchronise the list of issue keys returned by the enhanced search filter.)

2. Navigate to the area where you need to use this filter JQL and reference your filter in the JQL box using the JQL like below.

filter='NameOfHisSharedESFilter'

To help with searching for epics we provide the issuesInEpics() and parentsOf() and childnrenOf() JQL functions that will help to create the query that you require.

If you want just the enhanced search JQL functions, then we have the standalone Enhanced Search app that provides these at a smaller cost.

I hope this helps.

Regards,

Kristian

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
February 15, 2024

Hi @David Verbeure,

Unfortunately, this is trickier than one might think; as a hierarchical query, it would really require some kind of join or subquery, which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant epics, and then use the keys of these epics in a second query, in an "parent in (KEY-1, KEY-2, ...)" clause.

If you want to run your search "dynamically", without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" epic information down to the epic's children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. issuefunction comes from the Scriptrunner app, but there are many more.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
February 15, 2024

Just to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for Jira. Put simply, you'd create a sheet with all issues that are potentially relevant to you, enable the default issue hierarchy (that's just one click), and then use JXL filtering capabilities to narrow down to the issues that you care about:

epics-by-label.gif

(I'm using labels here, but it would work the same way with any other field.)

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

0 votes
Sagar Mahajan
Community Champion
February 15, 2024

Hi @David Verbeure  You can try the below JQL.

parent = ABC-1 AND label = XYZ

Here ABC-1 is the Epic issue who is parent of all the issues in that Epic and label name is XYZ

Please try and let me know if you get what you looking for.

Thanks

Sagar

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
February 15, 2024

Hi @David Verbeure 

You can start your journey here

https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/

Do you need to search all EPIC with a certain label?

issuetype = Epic and labels in (label2)

the labels in will allow you set to search for more than one label. only one label use =.

Regards

David Verbeure February 15, 2024

 @Aaron Pavez _ServiceRocket_ I want to see all issues in epics with label (123abc)

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events