---
title: "Show the latest modification dates for all spaces"
canonical: "https://support.appfire.com/space/REPS/475513808/Show%20the%20latest%20modification%20dates%20for%20all%20spaces"
format: markdown
---
> Macro (aura-html)

## Scenario

As an administrator or content manager on a Confluence instance with a lot of content, you may want to know which spaces are becoming obsolete.

This recipe lets you show the dates and times of all spaces when they were last touched by a user (commented, new additions, modified, etc.).

> ⚠️ This recipe may take a while to load results if your instance has a large number of spaces or pages. You may want to limit it to specific spaces.

## Result

![image](media://b828eac9-05b9-4bcc-a89a-652f7e235a2c)


## Recipe

| Apps | Reporting for Confluence Data Center |
| --- | --- |
| Level | Easy |
| Estimated time | 15 minutes |
| Macros | Combining Reporter, Content Reporter, Date Sort, Repeat Filter, Report Column, Report Info, Report Table, Text Filter, Text Sort |
| Suppliers | Content Supplier |

## Storage format

You can copy and paste this code into the [Confluence Source Editor](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472907841):

```
<p class="auto-cursor-target">
  <br />
</p>
<ac:structured-macro ac:macro-id="356f269f-552c-405b-aa59-61745bdb8ec6" ac:name="report-table" ac:schema-version="1">
  <ac:rich-text-body>
    <p class="auto-cursor-target">
      <br />
    </p>
    <ac:structured-macro ac:macro-id="4ac2f5e5-7886-438f-b9c5-c2944b6fd13a" ac:name="combining-reporter" ac:schema-version="1">
      <ac:rich-text-body>
        <p class="auto-cursor-target">
          <br />
        </p>
        <ac:structured-macro ac:macro-id="d0fe9fa9-e108-49fd-9d8f-c8e49ee89113" ac:name="content-reporter" ac:schema-version="1">
          <ac:parameter ac:name="spaces">
            <ri:space ri:space-key="@all" />
          </ac:parameter>
          <ac:rich-text-body>
            <ac:structured-macro ac:macro-id="6d3596e9-dcfa-4cb9-bc7d-c4c09d7a7d1f" ac:name="text-filter" ac:schema-version="1">
              <ac:parameter ac:name="required">true</ac:parameter>
              <ac:parameter ac:name="">content:space</ac:parameter>
            </ac:structured-macro> <ac:structured-macro ac:macro-id="c9ab9f36-23d1-4d68-8d8c-f75cfed676af" ac:name="text-sort" ac:schema-version="1">
              <ac:parameter ac:name="">content:space</ac:parameter>
            </ac:structured-macro> <ac:structured-macro ac:macro-id="42de1ec7-6f7f-44f0-87cc-602169f783a6" ac:name="date-sort" ac:schema-version="1">
              <ac:parameter ac:name="order">descending</ac:parameter>
              <ac:parameter ac:name="">content:modification date</ac:parameter>
            </ac:structured-macro>
          </ac:rich-text-body>
        </ac:structured-macro>
        <p class="auto-cursor-target">
          <ac:structured-macro ac:macro-id="04e44dce-093b-40ad-9a80-13f2c75f4ca7" ac:name="repeat-filter" ac:schema-version="1">
            <ac:parameter ac:name="match">first</ac:parameter>
            <ac:parameter ac:name="">content:space</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target">
      <br />
    </p>
    <ac:structured-macro ac:macro-id="cb214b42-0a70-4e25-8da6-b31706d843ed" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Space</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="eee7d0e3-5e13-465f-8ca7-e76db7f39d3e" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">content:space</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target">
      <br />
    </p>
    <ac:structured-macro ac:macro-id="c0f72f1f-1726-404d-8aab-f1027d2950be" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Content</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="fb4d86ec-569b-4cde-813f-4bdf059ef140" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">content:title</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target">
      <br />
    </p>
    <ac:structured-macro ac:macro-id="61388a67-c993-4758-bcf9-7f40b3cba10e" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Last Modified</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="1c68f34e-3c40-4751-af75-242764d7054c" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">content:modification date</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target">
      <br />
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
  <br />
</p>
```


## Macro structure

You can recreate the example in the editor view:

![image](media://ecf39bcd-b055-4b63-b78c-e70d13c67c81)

## Line-by-line explanation

| **Steps** | **Description** |
| --- | --- |
| 1 | The Report Table macro formats the report as a table. |
| 2 | The Combining Reporter macro encloses the Content Reporter macro and the Repeat Filter macro. Therefore, it takes the results list of contents retrieved from the Content Reporter macro to be filtered via the Repeat Filter macro |
| 3 | The Content Reporter macro, with **Spaces**: `@all`, retrieves all contents from all spaces.<br>> ⚠️ Using **Spaces**: `@all` may cause performance issues if your instance has a large number of spaces or pages. You may want to limit it to specific space keys. |
| 4 | The Text Filter macro, with **Key**: `content:space` and **Required**: selected, filters the contents from the Content Reporter macro to ensure they have valid spaces. |
| 5 | The Text Sort macro, with **Key**: `content:space`, sorts the contents by space name. |
| 6 | The Date Sort macro, with **Key**: `content:modification date` and **Order**: `descending`, sorts the contents by date of last modification. |
| 7 | The Repeat Filter macro, with **Key**: `content:space` and **Match**: `first`, takes the sorted and filtered list of contents from the Content Reporter macro and filters it again, removing contents from the same spaces and only including the first content for each space. |
| 8 | Three Report Column macros create three columns with titles `Space`, `Content`, and `Last Modified`. |
| 9 | The Report Info macro, with **Key**: `content:space`, displays the space name of each content retrieved from the Combining Reporter macro. |
| 10 | The Report Info macro, with **Key**: `content:title`, displays the content name of each content retrieved from the Combining Reporter macro. |
| 11 | The Report Info macro, with **Key**: `content:modification date`, displays the date of last modification of each content retrieved from the Combining Reporter macro. |