As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I've just noticed that when you move a file to a different folder using Alfresco Share, the creation date of the file is preserved, but the "last modification" date gets changed to current time.Is this intentional? Is there a way to force Alfresco to preserve the modified date for a file moved to another folder?Thanks!
Yes it's intentional,cm:modified is one auditable property, and managed by the system.When you move a file to another folder,you have already modified it's location,technically,you have modified it.
No,You'd better keep the default
Alternatively, if you have very specific requirement to preseve the original createdDate and modifiedDate, then you can create an aspect with properties (e.g. originalCreatedDate , originalModifiedDate) in your content model and copy the createdDate and modifiedDate metadata on the custom properties and apply the aspect. This way you will always have the originally populated created and modified metadata preserved in two custom properties for your specific use case. And leave the default functionality as is.
You can achieve this by implement a behavior onCreateNode event.
<aspect name="demo:customAuditMetadata"> <title>Custom Audit Metadata</title> <description>Custom Audit Metadata</description> <properties> <property name="demo:originalCreatedDate"> <title>Original Created Date</title> <type>d:text</type> </property> <property name="demo:originalModifiedDate"> <title>Original Modified Date</title> <type>d:text</type> </property> </properties> </aspect>