How can I search Confluence pages referencing a particular user?

Viewed 270

In Confluence one can mention user (link to user profiles) using @-mentions. This generate in the source of the page the following source code:

<ac:link>
    <ri:user ri:userkey="7adcb12b54a7421801558f952560024b"/>
</ac:link>

and this is visible on the page as a link:

<a href="/display/~USERLNFN" class="confluence-userlink user-mention current-user-mention userlink-0"
        data-username="USERLNFN"
        data-linked-resource-id="150351190"
        data-linked-resource-version="2"
        data-linked-resource-type="userinfo"
        data-base-url="https://wiki.swisscom.com"
        data-user-hover-bound="true"
        title="">
    @Lastname Firstname, Department
</a>

How can I search for all pages containing this reference?

1 Answers

I have confirmed this can be on Confluence server 7.4.7, and so should be the same on most server/dc installations. This currently cannot be done on cloud.

Within the Confluence Advanced Search there should be an Add a filter button. Click that, then select Mentioning User and input one or more user names. That should return all mentions of a user, including in comments. You can filter out the comments by changing Of Type to be Pages

This also isn't a programmatic solution, but that would probably be a question of the best way to access all the pages, and then search them. Maybe download via API then Elasticsearch?

Related