Pages CreatedDate keep original uSync/modify in db
Hello,
I have used the uSync content edition addon to move pages from one database to another. Problem: all the pages CreatedDate properties are replaced with the date when importing them. I would like to keep the original date of the properties. Is this possible when using uSync? If not, is it possible to edit the CreatedDate properties of the pages in the database myself?
yeah - i need to take a look at that, but I think the update date is actually set by the database. so gets updated when you save.
also, if we can do it, we will have to put something around it because you might not want usync to consider it a change if nothing but the updated date is changed.
Pages CreatedDate keep original uSync/modify in db
Hello,
I have used the uSync content edition addon to move pages from one database to another. Problem: all the pages CreatedDate properties are replaced with the date when importing them. I would like to keep the original date of the properties. Is this possible when using uSync? If not, is it possible to edit the CreatedDate properties of the pages in the database myself?
Thanks
I found in this thread that you can edit the "CreateDate" property in the database: https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/56716-Can-I-change-created-date
update umbracoNode SET createDate = GETDATE() where id = 128345
So you can write your own script or edit them manually in database editor of choice.
I have not found a solution to retaining the create date property with uSync when importing.
Hi Rasmus,
I can't remember why we didn't have the creation date in uSync ? I am sure there was a reason...
but as i can't work out what it was .. we now have an update to include the creation date
https://github.com/KevinJump/uSync8/commit/9fa9597444446799175da5428ca6cd7d520f46ff
Just going to check it doesn't break anything and we will push it out in the next release.
Kevin
Hi Kevin,
Thanks for fixing! I also request that the same be done for the property "UpdateDate", it is the same problem there.
Kind regards,
Rasmus
yeah - i need to take a look at that, but I think the update date is actually set by the database. so gets updated when you save.
also, if we can do it, we will have to put something around it because you might not want usync to consider it a change if nothing but the updated date is changed.
might take a bit more investigation.
Hi
To follow up: We can't set the
UpdateDate
as part of the sync (well we can set the value but it just gets wiped).When we call the
SaveAndPublish
on the item as part of the sync this changes the updateDate to now, so our settings just get wiped.Hi Kevin,
Okay I see, thank you for checking it out and trying to see if it could be done.
Have a nice Christmas!
/Rasmus
is working on a reply...