Best way to show lastmoddate of pages and child/grandchild pages in a space

Hey there,

I've got a user request to generate a table of certain parent and child/grandchild page groupings within a space ordered by last modification date.

They want to be able to see how recently particular parts of the space are updated and which are ignored.

Is there an SQL Query that anyone could suggest that would help with this? 

My very basic example below does not pull in child pages but hopefully it will be enough to give you a sense of what I am trying to achieve (of course I imagine the solution will be much more complex to account for the child and grandchild pages). smile

select TITLE, LASTMODDATE from CONTENT C
where C.CONTENTTYPE="PAGE" AND C.PARENTID=12345678
order by LASTMODDATE DESC
;

Thanks in advance smile 

1 answer

Hi Daniel,

you can use the metadata-report macro for this purpose (see https://marketplace.atlassian.com/plugins/org.andya.confluence.plugins.metadata). Below an example configuration:

<ac:structured-macro ac:name="metadata-report">
 <ac:parameter ac:name="sort">Last Time Changed desc</ac:parameter>
 <ac:parameter ac:name="root">My Parent Page</ac:parameter>
 <ac:parameter ac:name="pages">@descendants</ac:parameter>
 <ac:parameter ac:name="type">page</ac:parameter>
 <ac:parameter ac:name="space">
 <ri:space ri:space-key="My Space Key"/>
 </ac:parameter>
 <ac:parameter ac:name="maxResults">250</ac:parameter>
 <ac:parameter ac:name="">Parent,Page,Last Time Changed,Last Changed By</ac:parameter
</ac:structured-macro>

This delivers a table with the following header:

image2015-3-24 10:40:39.png

Regards,
Matthias

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,178 views 20 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you