I need to write a query that will show all epics with an empty CM Change Type that are under Initiatives that have a Work Type of Change. I've been able to write a query to show all initiatives with a work type of change and a query to show epics with empty change types, but can't figure out how to combine the two for the desired results.
Someone told me I could use issuekey in childIssuesOf("") but I'd have to manually enter the Jira IDs that the other query produced. My thought would be a nested function, but I know JQL does not have that capability.
Is there a workaround for this? Any tips would be appreciated.
Right now, my company is in data center but we are migrating to the cloud some time in January. Unsure if that's relevant info, but including just in case.
I did try the answer from Bhushan but kept getting an error about "workType" being invalid. I'm assuming it had something to do with how my employer configured our custom fields. I did end up reaching out to an internal Jira team. Unfortunately, we found it easiest to write a query to pull all initiatives with a change type of Change and then use those results in "issuekey in childIssuesOf()" It was a lot of manual work but it got the results we needed. I imagine "issueType = Epic AND parentLink in (KEY-1, KEY-2, ...)" would have saved me a bit of typing, but not a lot.
Thank you both so much for your input and guidance. I definitely learned some new things and because of that your answers have been invaluable
welcome to the community!
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 you want to run your search dynamically, without manually stitching two queries together, you'll need extra tooling:
Hope this helps,
Best,
Hannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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, model your initiative/epic-based issue hierarchy (that's just a couple of clicks), and then use JXL filtering capabilities to narrow down to the issues that you care about:
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Autumn Salinas ,
Combining these conditions in JQL can be a bit tricky, especially when you're dealing with multiple layers of issue hierarchy and conditions. Unfortunately, JQL doesn't have a direct nested function capability for such complex queries. However, there might be a workaround.
Assuming your Initiatives and Epics are linked via issue links, here's an approach using the issue in and linkedIssue functions:
issueFunction in linkedIssuesOf("workType = Change and type = Initiative") AND issueType = Epic AND "CM Change Type" is EMPTY
This query attempts to find all Epics that are linked to Initiatives of work type "Change" and have an empty "CM Change Type."
Also, if you feel my input help you please accept the answer.
Regards,
Bhushan
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.