JQL query to find stories from X project that has dependency with stories from Y project
Asked by Anna Trubka:

Hey community!   
Can you please help with query to find stories from X project that has dependency with stories from Y project


Answers:
author: Hannes Obweger - JXL for Jira
body: Hi [@Anna Trubka](/t5/user/viewprofilepage/user-id/5230517)

if you're open to solutions from the Atlassian Marketplace, this would now be easy to do using 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=2373414).

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* , *issue grouping* by any issue field(s), *sum-ups* , or *conditional formatting* - as well as the ability to perform *text filtering (with logical operators)* on all issue fields and columns.

This is how it looks in action:

![issue-link-filtering-v3.gif](https://community.atlassian.com/t5/image/serverpage/image-id/313995i14E48C51C20AEF15/image-size/large?v=v2&px=999 "issue-link-filtering-v3.gif")

Here, I'm filtering down to all issues that have an issue link to project JPD. For more complex use cases, you could also use [regular expressions](https://en.wikipedia.org/wiki/Regular_expression).

Once you've narrowed down your list of issues, you can work on your 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: mauricio.groth
body: **Hi [@Anna Trubka](/t5/user/viewprofilepage/user-id/5230517)**

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 all the stories from project x that are linked to stories from project y:

```
issue in linkedIssuesOfQuery("project=yyy and type = story") AND project=xxx and type = story
```

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


author: Sachin Dhamale
body: [@Anna Trubka](/t5/user/viewprofilepage/user-id/5230517)

Welcome to the Atlassian Community !!  

May I know do you have linking between 2 stories which are dependent to each other?

Thanks,

Sachin

comments: author: Sachin Dhamale
body: [@Anna Trubka](/t5/user/viewprofilepage/user-id/5230517)

If they are linked using issue link type then using JQL you can filter out those issue

You need to use script runner plugin where issueFunction is there through that you can get the issue which has specific type of link


Tags: cloud