Forums

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

JQL for issues linked to files in the Documents Tree?

MAX April 21, 2025

Hi everyone,

I am looking for options to query for various Issue Links using JQL.

Specifically, a way to search for tickets that have a Linked Document/File in the Documents Tree.  

Thank you!

___

But I am also interested in whatever other JQL is available for querying for things to do with Links.  Things that have a Link or do not, or issues that have a certain type of link ("has to be done before", etc.).

1 answer

0 votes
Danut M _StonikByte_
Atlassian Partner
April 22, 2025

Hi @MAX,

What is the "Documents Tree" that you are referring to?

Is is the one introduced by our Documents for Jira plugin?

image.png

Danut.  

MAX April 22, 2025

Hi, yes, that's the one! Apologies, I thought Documents for Jira came pre-packaged with Jira, but it's just my organization I suppose. 

In Documents for Jira, there's a way to link Issues to specific documents placed in that plugin.  They display like regular Links between other Issues inside each ticket.

Is there any way to use "base" JQL or ScriptRunner to filter Issues that have one of these "Document" Links, or to check if they have a specific Link Type relatnig to the Documents for Jira plugin?

Danut M _StonikByte_
Atlassian Partner
April 23, 2025

Hi @MAX,

I assume that you are in Jira Server or Data Center (not Cloud).

The documents are linked to Jira issues as remote links. Unfortunately, native JQL cannot search for remote links. There's no built-in field or function like hasRemoteLink() or similar...

I asked ChatGPT for a potential solution based on ScriptRunner, and it might be possible to create a custom JQL function that returns issues that have remote links. 

I haven't tried it as I'm not familiar with ScriptRunner, but it might be worth a try.

image.png

Hope this helps.

Danut.

Suggest an answer

Log in or Sign up to answer