How to show Epics that are associated to another Project's stories
Asked by Jones, Carlin A:

I'm looking to show Epics from Project A that are associated to Stories in Project B on Project B's Project and Board; I do not want to see all Epics from Project A. I do not see an option on the filters to do that. So far, I've used 'Project IN (A, B)' and contains a keyword, but those would not provide the correct filtering I'm looking for. I want to see if there is a dynamic option that pulls the Epic into Project B as soon as a Story is associated with it. Is there a way to do this?


Answers:
author: mauricio.groth
body: **Hi [@Jones, Carlin A](/t5/user/viewprofilepage/user-id/5194249)**

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](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 Epics that are associated to another project's Story:

```
issue in linkedIssuesOfQuery("project = B and type=Story") AND type=Epic and project = A
```

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,

Maur?cio

comments: author: Jones, Carlin A
body: Howdy Mauricio,

Thank you for the insight. We'll review JQL Search Extensions and see if the product is right for us.

Thank you,

Carlin Jones


author: Hannes Obweger - JXL for Jira
body: Hi [@Jones, Carlin A](/t5/user/viewprofilepage/user-id/5194249)

just to put this out there, another option might be to consider one of the more [hierarchy-focused](https://marketplace.atlassian.com/search?query=hierarchy) 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 defining and 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.

The advantage here is that you can actually *view* your issues in their hierarchy, which depending on your exact use case, may make things considerably easier.

comments: author: Hannes Obweger - JXL for Jira
body: Just to expand on the above, here's how this would look in the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2329893):

![epics-with-stories-in-other-projects.gif](https://community.atlassian.com/t5/image/serverpage/image-id/252003i2310F0AC9F8F7CC9/image-size/large?v=v2&px=999 "epics-with-stories-in-other-projects.gif")

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) *issue hierarchies*. Once a hierarchy is enabled, you can use JXL's search and filter capabilities to narrow your issues down to exactly what you're looking for.

Once you've got 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


author: Trudy Claspill
body: [@Jones, Carlin A](/t5/user/viewprofilepage/user-id/5194249)

Welcome to the Atlassian community!

How are the issues in project B associated to the Epic in Project A? Are the project B issues children of the Project A Epic?

Are you working with Jira Server/Data Center or Jira Cloud? If your Jira URL is similar to the one below then you are working with Jira Cloud.

<https://yourCompany.atlassian.net>

comments: author: Jones, Carlin A
body: Howdy Trudy,

Project B are the stories associated with the Epic in Project A through the Epic Link; we are currently working with Jira Server but we are moving to the Cloud in the coming months.

Thank you,

Carlin Jones


author: Valeriia_Havrylenko_SaaSJet
body: Hello [@Jones, Carlin A](/t5/user/viewprofilepage/user-id/5194249)   
Welcome to the community!

Yes, it is possible to show Epics from Project A that are associated with Stories in Project B on Project B's board using JQL filters in Jira. You can use the following JQL query:

**project = B AND "Epic Link" in (project = A)**

This query will filter out all the Epics from Project A that are not linked to any issues in Project B. It will only display the Epics that have at least one Story linked to it in Project B.

To ensure that the Epics from Project A are dynamically pulled into Project B as soon as a Story is associated with it, you will need to make sure that the Epic Link custom field is available in both Project A and Project B.

You can follow these steps to check if the Epic Link field is available in both projects:

1. Go to the Project Settings of Project A and Project B.
2. Click on the Fields section in the sidebar.
3. Check if the Epic Link field is available in both projects. If not, add it to both projects.

Once the Epic Link field is available in both projects, you can link Stories in Project B to Epics in Project A by selecting the appropriate Epic in the "Epic Link" field of the Story.

After linking the Stories to the Epics, you can use the JQL query mentioned above to filter the Epics and display only the relevant Epics on the Project B board.

comments: author: Jones, Carlin A
body: Howdy, thank you for the welcome and feedback. When I use 'project = B AND "Epic Link" in (project = A' I get an error returned. I've checked to make sure the Epic Link field is available in both projects. It looks like the error comes from "Epic Link" In (project = A); I'm not sure how else to pull the Epic comes from Project A.


author: Valeriia_Havrylenko_SaaSJet
body: [@Jones, Carlin A](/t5/user/viewprofilepage/user-id/5194249)

It looks like the JQL you provided is not formatted correctly. To search for Epics in Project A that are associated with Stories in Project B, you can use the following JQL:

**project = B AND "Epic Link" in issuesInProject("A")**

This JQL will search for issues in Project B that have an Epic Link field that is linked to an Epic in Project A.

Make sure that the Epic Link field is available in both projects and that the field name is spelled correctly. Also, make sure that you have the necessary permissions to view issues in both projects.


author: Trudy Claspill
body: [@Valeriia_Havrylenko_SaaSJet](/t5/user/viewprofilepage/user-id/5162664)

Native Jira Jql functionality does not support either

- using a filter for the "Epic Link" field criteria when using the = operator

- the issuesInProject function


author: Valeriia_Havrylenko_SaaSJet
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) Thank you!


Tags: epic

filter

story