Last Modified date

Migrated from Rhythmyx forum:

I was running a JCR Query on Percussion content items to get a report on items that have not been updated for a while. I used this field in my query: rx:sys_contentlastmodifieddate

Strangely, when I was cross verifying the report, I found the Last Modified date behaving oddly. There were several content items which has a more recent Last Modified date, but those items have not been touched for several years. When I ran the revisions/ audit trail, it accurately showed correct date which was several years ago when the item was actually updated or checked in.

Can someone explain the difference between these 2 dates. Strangely, it is not an issue for majority of the items, but is happening for some of the items.

Thanks
Manvinder

This is likely a difference between content status (Content) and content status history where the Revisions are stored.  For example if a Revisioned item is Quick Edited, the Last Modified Date will be changed.  This can happen if someone double clicks the content item for example but never transitions it.  A new revision won’t be created until the item is checked in.  

Last Modified might also be set if the item is a parent or grandparent in a slot relationship if a child item is transitioned.  For this reason the rx:sys_contentlastmodifieddate is not as reliable as the last revision date.

One approach that people take with this is to add their own hidden field on the content type to store the last modified date that is set by a Pre-Processing extension call when the item is transitioned. You could then use that in your jcr query and have a more reliable last modified on the content type.