Modified date changes when moving a document to another folder

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Modified date changes when moving a document to another folder

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!

2 Replies
Highlighted
Advanced

Re: Modified date changes when moving a document to another folder

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

Highlighted
Moderator
Moderator

Re: Modified date changes when moving a document to another folder

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>

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)