Filter by Issue Links "mentioned in"
Asked by Kevin Le Ner:

Is it possible with a jql query to filter issues by Issue Links "mentioned in" ?  
The "mentioned in" issue links are automatically created when issues are inserted in a confluence page :  
![](../../upfiles/LinkMentionedIn.png)  
For instance, I want to filter in Jira all the issues mentioned in the same confluence page.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: You can use the JQL Tricks Plugin (commercial) to do this. See hasRemoteLinks function.

[](http://www.j-tricks.com/jqlt-links-functions.html)<http://www.j-tricks.com/jqlt-links-functions.html>

If you want to search for issues with specific page link, use the last example.

comments: author: Kevin Le Ner
body: Hi Jobin,  
Thanks for your reply. Is there another (non-commercial) solution ?


author: kdesyatkov
body: This Plugin don't support "mentioned in".issue in hasLinks("mentioned in")Could not find any issue link type having either inward or outward description: mentioned in. Available links are: \[adds, is added by, changes, is changed by, cloned from, cloned to, blocks, depends on, duplicates, is duplicated by, is Epic of, has Epic, introduces, is introduced by, could prevent, could be prevented by, removes, is removed by, requests, is requested by\]


author: hote
body: agree with @Konstantin Desyatkov, This plugins can search for issues by "link name" such as cloned to, blocks, and it can search for issues by remote link when linking to a URL, but "mentioned in" belong to either of the two situations.


author: hote
body: but "mentioned in" belong to neither of the two situations.


author: David Skreiner
body: Atlassian hasn't bothered to implement a way to search for @mentions directly using JQL.

Plugins however tend to be expensive and cause problems during upgrades.

The workaround most people seem to use is to JQL-query for issues containing the name of the user in comments or text. Not ideal, but better than nothing, or having to spend money again just because Atlassian decided not to implement a feature.  

Like this one: "Issues the user was mentioned in last week", I think you can leave out the "summary" part.  

(summary \~ "username" OR description \~ "username" OR comment \~ "username") and updatedDate \>= -7d

comments: author: Jacus_de_Beer
body: A shortcut for the series of ORs is:

text \~ currentUser()

Which will find all references to the current user in any text fields (including summary, description, and comments)

See: <https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-fields-reference-764478339.html#Advancedsearching-fieldsreference-textTextText>


author: dezren39
body: thank you


author: Marco Weist
body: I had the same issue. I wanted to create a JQL query to show me all stories which are linked within a certain confluence page.

It is possible to create that query. As mentioned somewhere else it is possible to see a counter for the linked issues directly in Confluence. This counter gives the option to show a list of these tickets in Jira in the issue filter view.

To do that it applies a JQL query such as  
"issue in (issuesWithRemoteLinksByGlobalId('...),...)"

Just copy and paste the query and replace "in" with "not in" or whatever is desired.

comments: author: Dami?n S?nchez Moreno
body: This is the right answer.


author: Penelope Hobbs
body: This is the right answer and here's another thread with details for using the query: <https://community.atlassian.com/t5/Jira-questions/How-to-list-the-globalId-to-use-in/qaq-p/177062>


author: vvzh
body: I had similar problem: creating a JQL query to select all the issues mentioned in some text block. To solve it I made a simple JavaScript application: <https://github.com/vvzh/jiralinker>


author: Aitor Morant
body: I needed also has a list with issues from a Fix version which contains at least one confluence document. The only way I found is to make a Query in Confluence (with Pocket Query plugin) pointing to Jira database, something like this (my database is Oracle):

```
SELECT project.pkey||'-'||jiraissue.issuenum idjira, projectversion.id, projectversion.vname, remotelink.urlFROM projectversion,nodeassociation,jiraissue,remotelink,projectWHERE nodeassociation.ASSOCIATION_TYPE = 'IssueFixVersion'AND nodeassociation.SINK_NODE_ID = projectversion.idAND nodeassociation.SOURCE_NODE_ID = jiraissue.idand projectversion.vname in (:Version)AND remotelink.title in ('Page','Wiki Page') AND remotelink.issueid=jiraissue.idand project.id=jiraissue.project; 
```

Hope it helps.. ;)


author: hote
body: I tried to search issues mentioned in Confluence with Script Runner which own rich and useful JQL functions. May be @Jamie Echlin (Adaptavist) knows that is there any possible to search for the issues has "mentioned in"link type,because "mentioned in" a confluence page belongs to neither any link type name nor remote link to a URL, so I cannot use haslinktype or linkedIssuesOfRemote to find out what I need. thanks


author: LUC FILION
body: Another recent solution and probably more accessible for common users is Impact for JIRA (<http://bit.ly/1tYPzxu>), which allows to display issues with confluence links in a tree view.

Cheers,

Luc


Tags: issue-link

jql

mention