XPath query to search documents that unpublished within some date range

We are trying to find all the documents that unpublished within some date range.
Also trying to find any scheduled offline actions performed during that date range, along with the unpublish date.

It seems like CMS is not recording timestamp for unpublication action in the form of date property as we have hippostdpubwf:publicationDate for publication action.

It would be really helpful if anyone pull this type of report before.

Thank you in advance.
Savan

Hi,

As you noted only the publication date is a property on the document. Even that is only the last publication date, so iif you make edits this will be set to that time. What is possible is that you determine this based on the audit log. You can look for the unpublish actions in /hippo:log. You can also look in the audit log in the tomcat logs, it’s the same information.

There are some issues with getting the information like this. The log contains the uuid of the document and the path, but not the hippo:name (display name). Also, the log may well be truncated to a limited time period (indeed, this is a standard maintenance action). The file logs may also not be preserved depending on your organizations archiving policy.

If this is information you need as a matter of course, then I highly suggest you write a more explicit logging for this. You can use event listeners to log these actions with the specific information you need. Then either write it to file (a specific logger configured in log4j) or to a node in the repository.

As for the xpath
//*[@hippolog:action='depublish']
That will get you all the depublish log events. For a range:
//*[@hippolog:action='depublish' and hippolog:timestamp > 1657528483326 and hippolog:timestamp<1657528483328 ]

Thank you so much @jasper.floor

This is really helpful!! Thanks again!!