Listing pages that were modified by current user

Scenario

This guide allows you to generate a list of pages that the current user has either created or modified, even if they were not the last person to modify it.

For example, if a user created and edited a page on July 12th, then someone else edited the page on July 13th, the report would show the date of the current user's modification date as well as the date it was most recently modified by someone else.

This is possible because the Content Supplier allows reporting of pages that have been recently modified. And using the modifier key, it is also possible to report the user who most recently modified the page.

Be aware that if there are thousands of edits on a single page, the report may take a long time to generate.

Result

Recipe

Apps

Reporting for Confluence Server & Data Center

Apps

Reporting for Confluence Server & Data Center

Level

Intermediate

Estimated time

15 minutes

Macros

Content Reporter, Report Column, Report Info, Report List, Report Table, Text Filter

Suppliers

 

Storage format

You can copy and paste this code into the Confluence Source Editor:

<ac:structured-macro ac:macro-id="09080ba6-f835-4b53-8bd4-e78650973546" ac:name="excerpt" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p>Pages that I have modified even if I was not the one to create or last modify the page.</p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="64717b63-f883-44be-a38e-501521b3805f" ac:name="report-table" ac:schema-version="1"> <ac:parameter ac:name="maxResults">15</ac:parameter> <ac:parameter ac:name="injected">true</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="d75e5d0e-022d-4f60-a56e-2b26c5ddba31" ac:name="content-reporter" ac:schema-version="1"> <ac:parameter ac:name="types">page</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="daf1bbb6-b764-41ae-a81a-727b7f7ce234" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%global:current user%</ac:parameter> <ac:parameter ac:name="">content:version history &gt; collect "modifier"</ac:parameter> </ac:structured-macro>&#xa0;<ac:structured-macro ac:macro-id="e3a47eb3-bac9-4cb0-a06e-b6eabb75267a" ac:name="date-filter" ac:schema-version="1"> <ac:parameter ac:name="afterValue">2020-07-10</ac:parameter> <ac:parameter ac:name="format">YYYY-MM-dd</ac:parameter> <ac:parameter ac:name="">content:modification date</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="ca851dd7-0d67-4107-868f-1b19ac45246a" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Page</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="9e9be66d-8e72-4968-9c2a-9df49738664f" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">content:title</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="0802cfa3-a734-4bc6-a4e8-16cfea0ada57" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Page created</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="a0f6c848-9038-4d9a-97f2-838e629c0df2" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">YYYY-MM-dd</ac:parameter> <ac:parameter ac:name="">content:creation date</ac:parameter> </ac:structured-macro>&#xa0;by&#xa0;<ac:structured-macro ac:macro-id="8f88cce9-df0b-4fcd-b11e-a94453ed09c8" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">content:creator</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="b96f45f6-30ec-4b09-a50d-bb1dd3dc1c74" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Date last modified by ME</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="fb70c2d0-8b7c-45d9-ba57-bb3d91ab1337" ac:name="report-list" ac:schema-version="1"> <ac:parameter ac:name="maxResults">1</ac:parameter> <ac:parameter ac:name="style">none</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="0b871f15-381a-4dd9-8aa8-293d03acc00b" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="">content:version history</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="0a27b71b-f721-457c-9bb1-8603b03605f0" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%global:current user%</ac:parameter> <ac:parameter ac:name="">content:modifier</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="a218551e-6d9b-4080-9dc7-1acf9d0b1968" ac:name="report-body" ac:schema-version="1"> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="08702509-44fb-44a1-a27e-fc4c6db535da" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">YYYY-MM-dd</ac:parameter> <ac:parameter ac:name="">content:modification date</ac:parameter> </ac:structured-macro> on version <ac:structured-macro ac:macro-id="a127f2a0-8ffa-43a5-ad15-796476341c5e" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">content:version</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="242f89ff-cab3-4213-a83f-622be40f9c30" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Is latest version?</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="442f12a3-5131-4c98-a3e7-409ebe5cebf0" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">content:is latest version</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="5ce4c47d-453a-4e2e-b9e7-e3edd51d1d34" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Date last modified by ANYONE</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="d23c06e2-2fad-4586-bbdf-69fb08201748" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">YYYY-MM-dd</ac:parameter> <ac:parameter ac:name="">content:modification date</ac:parameter> </ac:structured-macro>&#xa0;by&#xa0;&#xa0;<ac:structured-macro ac:macro-id="65fee67e-c09a-4548-afe0-78f04b38629a" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">content:modifier</ac:parameter> </ac:structured-macro>&#xa0;on version&#xa0;<ac:structured-macro ac:macro-id="de7caa17-947d-46dd-9948-a54a132751b8" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">content:version</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="3955cc38-67a2-414f-89ad-072ec1b56efa" ac:name="report-empty" ac:schema-version="1"> <ac:rich-text-body> <p>Sorry, no results</p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro>

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create Report Table and tick Injected parameter.

  2. Within Report Table macro, create Content Reporter macro and types set it to "page".

  3. Within Content Reporter macro, create Text Filter macro and set the following parameters:
    Key: content:version history > collect "modifier"
    Contains Value: %global:current user%

  4. Under Content Reporter macro, create four Report Column macros.

  5. Set the first Report Column macro's Title to "Page Title" and add a Report Info macro within it.
    Set the Report Info macro's Key to "page:title".
    Tick the Link To Item.

  6. Set the second Report Column macro's Title to "Date created or last modified by me".

  7. Within the second Report Column, create a Report List macro with max result =1

  8. Within the Report List macro, add a Local Reporter macro
    Set the Local Reporter macro's key to "content:version history"

  9. Within Local Reporter macro, create Text Filter macro and set the following parameters:
    Key: content:modifier
    Contains Value: %global:current user%

  10. Create a Report Body macro

  11. Within the Report Body macro, insert 2 Report Info macros
    Set the first Report info macro's Key to "content:modification date"
    Set the second Report info macro's Key to "content:version" 

  12. Set the third Report Column macro's Title to "Last Modified By".
    Set the Report Info macro's Key to "content:modifier".

  13. Set the forth Report Column macro's Title to "Last modified on".
    Set the Report Info macro's Key to "content:modification date".