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>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.