List the pages modified by the current user

List the pages modified by the current user

Scenario

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

For example, if a user created and edited a page on July 12 and someone else edited it on July 13, the report will show 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.

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 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 with Injected: selected.

  2. Within the Report Table macro, create a Content Reporter macro with Types: page.

  3. Within the Content Reporter macro, create a Text Filter macro with the following parameters:

    • Keycontent:version history > collect "modifier"

    • Contains Value%global:current user%

  4. Under the Content Reporter macro, create four Report Column macros with Title parameters set to Page Title, Date created or last modified by me, Last Modified By, and Last modified on.

  5. Within the Page Title Report Column macro, create a Report Info macro with the following parameters:

    • Key: page:title

    • Link To Item: selected

  6. Within the Date created or last modified by me Report Column macro, create a Report List macro with Maximum Results: 1.

  7. Within the Report List macro, create a Local Reporter macro with Key: content:version history.

  8. Within the Local Reporter macro, create a Text Filter macro with the following parameters:

    • Keycontent:modifier

    • Contains Value%global:current user%

  9. Under the Local Reporter macro, create a Report Body macro.

  10. Within the Report Body macro, create two Report Info macros with Key parameters set to content:modification date and content:version, and the on version phrase between the two macros.

  11. Within the Last Modified By Report Column macro, create a Report Info macro with Key: content:modifier.

  12. Within the Last modified on Report Column macro, create a Report Info macro with Key: content:modification date.