Reporting allows you to see what spaces are active and what have lain dormant.
This recipe lets you find out when a space was last touched by a user (commented, edited, additions, etc.)
Note: The report may take some time to load depending on the volume of content to report on.
|Date||Space||Last Modified Content|
Mon Dec 28 04:01:16 GMT 2020
Reporting for Confluence
How to calculate numbers stored in List Data macro
You can copy and paste this code into the Confluence Source Editor:
You can recreate the example in the editor view:
The report will be formatted as a table using Report Table. maxResults field is set to '1', to display only the first (latest) content.
Content Reporter will be used to grab all the contents from the current space. The contents may be in the forum of pages, news and comments, etc.
In order to know which content has most recently modified, the contents were sorted according to date using Date Sort, setting supplier key to 'Content Supplier'. By setting field order to ascending, the first item of the collection of contents is the one we are looking for.
Text Filter will be used to exclude the current page, which when updated is technically the latest modified content. To avoid this, Text Filter excludes the current page from the list of contents pulled from Content Reporter to be evaluated. The exclude field of text-filter is set to the title of the current page and supplier key set to Content Supplier. On #1, having set maxResults to 1, this ensures that table will only show the first result.
Report Column is used to create individual columns, storing column title and report data. The titles of the three created columns are set to Date, Space and Last Modified Content, in that order.