Forums

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

JQL Query to get all Parent and Child issues from project A for a team in project B

Fabian H June 30, 2023

Hello guys,

i hope anyone can help me on this one: I have 2 projects (Project A and Project B). Project A has lots of issues that are related to some issues for a team in project B.

I need all parents and child issues from Project A that are related to a specific team in project B.

I know it probably cant be done with jql alone. 

1 answer

0 votes
Trudy Claspill
Community Champion
June 30, 2023

Hello @Fabian H 

When you say "issues for a team in project B", are all issues in project B for that team, or are only some of the issues in project B for the team?

How do you create the relationship between the issues in Project B and Project A? Are you using issue linking or some other method?

Do you want only the issues that explicitly have that relationship, or are you looking at getting the Epics that have the relationship and getting all the child issues for those Epics regardless of whether or not the child issues themselves have that relationship?

Fabian H July 1, 2023

Thank you for your answer :)

All issues in project B are for that team and for the relationships between the issues im using issue linking.

Yes i only want the issues that explicitly have that relationship.

Trudy Claspill
Community Champion
July 1, 2023

For the links you create between issues in project A and project B, do you use a link type between A and B that you use in project A only to link to project B? For example if you create links that project A issues are Blocked By issues in Project B, do you ever use Blocked By to create a link between a project A issues and an issue in another project other than project B?

Fabian H July 2, 2023

Yes exactly, i also create link types between A issues and issues in another project other than B. 

Trudy Claspill
Community Champion
July 3, 2023

Given the parameters of your scenario, native JQL capabilities are not able to meet your requirement.

The issueLinkType field will let you search for issues that have links to other issues using a particular Link Type, but will not let you also constrain that by specify the linked issues have to be in a specific project.

To be able to get the results through the Advanced Issue Search screen using a single JQL statement would require a third party app. Are you willing to consider paying for a third party app?

What do you want to do with the results? It might be possible to get the information through a multi-project Automation Rule, and send the results through emails. Only a Jira Administrator could create a multi-project Automation Rule.

Fabian H July 4, 2023

Do you mean something like Script Runner as a third party app?

Trudy Claspill
Community Champion
July 4, 2023

Yes, ScriptRunner is one such app that extends JQL functionality.

With that app you could use the linkedIssuesOf function, along with other criteria, to get what you want.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events