Hi All,
I have 10 epics, out of that 5 epics having label value "sales", I want to find all the user stories under those 5 epics having the label "sales". I tried with childIssues() function but it doesn't work search criteria. Please share the query if anyone aware of,.
Hi @Murali Krishna Nagasuri & welcome to the community,
Out of the box you can't find these with a so-called subquery. For that you need to install an app e.g. ScriptRunner.
With out of the box Jira you need to do this in two runs:
1. Find all epics with label 'sales':
issuetype = epic and labels = sales and resolution is empty
2. With the keys you get back you can do
issue in portfolioChildIssuesOf("EPICKEY-1") or
issue in portfolioChildIssuesOf("EPICKEY-2") or
issue in portfolioChildIssuesOf("EPICKEY-3") or
.... )
So far from ideal, because with every new epic you need to update the second JQL.
Workaround
With Automation for Jira you would be able to mark all child issues under an epic with label sales, e.g. by labeling them 'epic-sales'. Then you can run a simple JQL .
If you have scriptrunner use the following query:
issueFunction in issuesInEpics("labels = Sales") AND issuetype = Story
If you don't have ScriptRunner (Alternative without plugins)
Unfortunately, Jira Cloud doesn't allow direct hierarchy queries without plugins, but you can do a manual step using two queries:
First, find the epics labeled "sales":
project = PROJECT AND issuetype = Epic AND labels = Sales
Write down the epic codes (example: EPIC-101, EPIC-102, etc.).
Now, find all the stories associated with these epics:
"Epic Link" in (EPIC-101, EPIC-102, EPIC-103, EPIC-104, EPIC-105) AND issuetype = Story
This will list all stories about singles that have the "sales" label.
I hope the matter is resolved!
Best Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm Prosper, a Support Engineer at Appfire, and I'm here to assist you.
If you're open to a plugin suggestion, I recommend trying our app, JQL Search Extension for Jira.
You can use the following query to return direct child issues (stories) of epics that have the label "sales":
issue in childrenOfIssuesInQuery("type=Epic and labels=sales")
For more details on this query, you can refer to this resource or reach out to our support team. We're happy to help!
Best regards,
Prosper
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to Atlassian Community!
You can achieve this using third party app named Script Runner Enhanced Search. Here is the query for that:
issueFunction in childrenOf("type = EPIC and Labels = Sales")
Regards,
Ashish
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.