Migrating Comments using CommentOperation
Hello All,
I am trying to migrate comments from AEM 5.6.1 to AEM 6.2 (SP1 FP2). The comments in AEM 5.6.1 is legacy code not per OOTB comments functionality. For migrating I am looking to pick comment entries and create MSRP entries using the CommentOperation. I followed the UGC Migration Github link (by AEM Marketing Cloud) to take an idea how the comments can be generated as part of migration. The Github tool uses JSON as input, I am using JCR nodes as source.
I see that following: (comment)operations.create(resource, author, properties, attachments, session) is used to create the comment entries. In "properties" I am putting {"added":"time when comment was actually added"}
I am able to use the same logic to create the comment entries. However I see that in the entry all the time related properties i.e timestamp, latestActivityDate_dt, published -- All refer to the current time when migration was attempted. The "added" property is only reflected inside the "Object" part of the activity or notification entry.
How can I make sure while doing a create() operation that the time reflected in activities and notification is actually that is passed in the "properties" inside create method and not the current time.
Anyone with understanding on this, please share ideas on how I could update time/date appropriately when adding such multiple comment entries(that were added in past)
Thanks