Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Olofsson 23 posts 187 karma points c-trib
    Dec 18, 2019 @ 18:01
    Rasmus Olofsson
    0

    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

  • Rasmus Olofsson 23 posts 187 karma points c-trib
    Dec 18, 2019 @ 20:25
    Rasmus Olofsson
    0

    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.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 18, 2019 @ 21:16
    Kevin Jump
    100

    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

  • Rasmus Olofsson 23 posts 187 karma points c-trib
    Dec 21, 2019 @ 19:15
    Rasmus Olofsson
    0

    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

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 21, 2019 @ 20:42
    Kevin Jump
    0

    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.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 22, 2019 @ 12:26
    Kevin Jump
    0

    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.

  • Rasmus Olofsson 23 posts 187 karma points c-trib
    Dec 22, 2019 @ 18:28
    Rasmus Olofsson
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft