Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Search status of Linked Issue in different Project

Chris Hardy December 13, 2019

Hi,

 

The title pretty much describes what I'd like to do.  We have a project of Issues that are often linked to issues in another project.  We'd like to do a JQL query to find issues based on the status of the issues in the other project.  

I've search multiple places but have yet to find something on the status, even when you use (Project = "").

 

Has anyone else done this before?

 

Thanks

Chris

2 answers

0 votes
Zita Bagi
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.
December 17, 2019

-

0 votes
Zita Bagi
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.
December 14, 2019

Hello there, you can try something like

issueLinkType in (blocks) AND status in ("Open", "In Progress")

So this is not restricted to projects, it searched for only a link type (replace it with the type of link(s) you are using) and then you can select which statuses you want to search for.

Or if you use

Project in (X, Y, Z) AND issueLinkType in (blocks, causes) AND status not in (Closed, Resloved, Done, Canceled)

it will show all the open issue with a link type it certain projects. Or you can exclude a project by Project not in (....).

Is this what you were looking for?

Chris Hardy December 16, 2019

Thanks, but this is not quite what we want.  We want to be able to filter on the status of the linked issue.  For example, what open issues in project A are linked to a closed issue in Project B.

 

Does that make sense? 

Zita Bagi
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.
December 17, 2019

Based on

https://community.atlassian.com/t5/Jira-questions/Get-list-of-linked-issues-how-to/qaq-p/95753

I managed to create

project=A AND status=Open AND issue in linkedIssues(B-36, "relates to")

which shows the Open issues of project A which are linked to B-36 with the "relates to" link type.

If I understand correctly, instead of  linkedIssues(B-36, "relates to") you would prefer something like linkedIssues(Closed, "relates to"), but linkedIssues work only like this: linkedIssues(issueKey, linkType).

Zita Bagi
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.
December 17, 2019

Now based on

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#undefined

I made

issueFunction in linkedIssuesOf("project = B", "relates to") and status=Open and Project=A

This lists the Open issues in project A which have a "relates to" link type to any issues of project B. It still lacks the specification of Closed issues of project B.

These linked issue queries only work if you have ScriptRunner add-on.

I also tried issueFunction in linkedIssuesOf("project = B", "status=Closed") and status=Open and Project="A" which doesn't give me a result but it is marked correct with a green tick.

Like Ricardo Martinez likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events