What's the easiest way to get a report of last updated date for all pages in a space?

Periodically, I'd like to know the last time each page was updated, so I can see the oldest pages and check they're still accurate.

4 answers

1 vote

Hi Brian,

There are 2 ways to check for a page update. 

1) Through the Interface.

2) Through a database SQL query. I've created this one for you that shows all versions and modified dates of each page version:

select s.spacename, c.title, c.lastmoddate
from content c
join spaces s on s.spaceid = c.spaceid
where contenttype = 'PAGE'
and prevver is null
and spacename = '<SPACENAME>';

Note the <SPACENAME> must be replaced with the exact same name as the space including capital letters.

This query will show you all pages from a specific space with their last modification dates and names.

Cheers,

Rodrigo

Thanks. Method 2 is better as I actually want a report of all pages showing their last updated date. 

Hi, modified the query a little bit, so that last modified date is displayed in a descending order: 

 

SELECT s.SPACENAME, c.TITLE, c.LASTMODDATE
from [confluence].[dbo].[CONTENT] as c
join [confluence].[dbo].[SPACES] s on s.SPACEID = c.SPACEID
where c.CONTENTTYPE = 'PAGE'
and s.SPACENAME= 'HR'
order by c.LASTMODDATE DESC;

If one desires only published pages:

SELECT s.SPACENAME, c.TITLE, c.LASTMODDATE
from [confluence].[dbo].[CONTENT] as c
join [confluence].[dbo].[SPACES] s on s.SPACEID = c.SPACEID
where c.CONTENTTYPE = 'PAGE'
and c.TITLE is not null
and s.SPACENAME= 'HR'
order by c.LASTMODDATE DESC;

But if you want to see the name of the last updater:

SELECT s.SPACENAME, c.TITLE, c.LASTMODDATE, c.LASTMODIFIER, u.[username]
from [confluence].[dbo].[CONTENT] as c, [confluence].[dbo].[SPACES] s, [confluence].[dbo].[user_mapping] u
where c.CONTENTTYPE = 'PAGE'
and c.TITLE is not null
and s.SPACENAME= 'HR'
and s.SPACEID = c.SPACEID
and u.[user_key] = c.LASTMODIFIER
order by c.LASTMODDATE DESC;

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,044 views 15 13
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