09-07-2020 08:54 AM
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!
09-07-2020 12:47 PM
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
09-10-2020 12:19 PM
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>
Explore our Alfresco products with the links below. Use labels to filter content by product module.