Forums

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

Combining queries

Adam Taylor
Contributor
April 24, 2023

Hi,

I'm a working in a multi-team programme.

Our Epics are owned by Teams (a custom field in Jira) but some of the Stories and Tasks within those Epics are owned by another Team.

I need to be able to quickly see all Stories and Tasks that my team is responsible for delivering to fulfil another Team's Epic.

At the moment I'm doing this manually by:

  1. Searching for all Epics not owned by my Team and exporting that list of Epic Issues numbers; and then
  2. Searching for all Stories and Tasks owned by my team where the ParentEpic is in in the above list of Issue numbers.

Is there an easier way to do this in a single query?

Thanks!

 

2 answers

2 accepted

1 vote
Answer accepted
Hannes Obweger - JXL for Jira
Atlassian Partner
April 25, 2023

Hi @Adam Taylor

I don't think this is possible in "plain" Jira - it would really need some form of "join" or "subquery" in JQL, which unfortunately doesn't exist.

What you could do is to use Jira Automation to "propagate" the parent team field down to the children (into a separate custom field), and then query on the two fields directly on your children. Obviously, this would complicate your setup a fair bit - but it should be possible.

Alternative, if you're open to solutions from the Atlassian Marketplace, there's a few more ways forward:

  • There's a number of apps that extend JQL. I've used JQL Search Extensions a few times and it works great; IIRC, there's a function a la "Children of Epics in Query X", but I don't remember the exact syntax.
  • Alternatively, there's a number of more hierarchy-focused apps available that could help with this, too. I myself work on such an app, in which your use case should be easy to do; I'll add more information below.
Hannes Obweger - JXL for Jira
Atlassian Partner
April 25, 2023

Just to expand on the second point, this is how this could look in the app that my team and I are working on, JXL for Jira. You'd simply

  • create a sheet that contains a.) any epics from other teams, and b.) any stories/tasks from your team,
  • enabled the default issue hierarchy (that's just one click), and
  • hide issues without parents and issues without children.

epics-with-stories-from-different-teams.gif

Once you have your issues, you can work on these issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Any questions just let me know,

Best,

Hannes

0 votes
Answer accepted
mauricio.groth
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.
April 25, 2023

Hi @Adam Taylor 

I’m Maurício, a support engineer at Appfire and I’m here to help you.

Unfortunately, using JQL of Jira, 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 all Stories and Tasks whose Epics are owned by another Team:

issue in childrenOfEpicsInQuery("Teams = DEF")

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

We’ll be happy to help you!

Best regards,

Maurício

Suggest an answer

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

Atlassian Community Events