Reputation: 1383
Is there a way to query for all issues with a particular link type?
For example, let there be a dependency link where an issue can "depends on" another issue. Is there a query to find all issues that depend on some other issue (aka. all issues with the "depends on" link)?
I know there is the linkedIssues (key, linkType) function that returns the key of all issues that have the linkType with the issue with key. I want to find all issues with a linkType with any issue.
Thanks!
Upvotes: 48
Views: 73146
Reputation: 1495
In 2024, you can simply use issueLinkType
. Works on Jira Cloud. No need for add-ons or plugins.
For example issueLinkType=Duplicate
will give you all issues with that type of link. Or you can be more specific and use issueLinkType="is duplicated by"
to indicate direction.
Can match the link Name, or the inward/outward descriptions, as found on the IssueLinking configuration page: /secure/admin/ViewLinkTypes!default.jspa
Upvotes: 0
Reputation: 3748
You can use Script Runner plugin - Edit: It unfortunately is no longer free. The last version before 4.0 still is, though. Details here https://www.adaptavist.com/doco/display/SFJ/Downgrade+ScriptRunner
It sports a ton of incredibly useful functions, one of these is hasLinks()
Usage example:
issueFunction in hasLinks("blocks") OR issueFunction in hasLinks("is blocked by")
Upvotes: 18
Reputation: 17986
If you need a JIRA On-Demand solution - you might find this paid Add-On useful
It exposes MongoDB syntax and some conditions builder UI, so you should be able to search for the issues:
Upvotes: 2
Reputation: 2611
You can hack it with Craftware JQL's linkedIssuesFromFilter, where the filter would be "all issues"
Upvotes: 9
Reputation: 8210
The included function mentioned by Alexander is ideal for its purpose but if you want something more advanced check out the commercial JQL Tricks plugin: https://studio.plugins.atlassian.com/wiki/display/JQLT/Issue+Link+Functions
Upvotes: 2