Migrating Comments using CommentOperation | Community
Skip to main content
Shubham_borole
New Participant
April 20, 2017
Solved

Migrating Comments using CommentOperation

  • April 20, 2017
  • 3 replies
  • 1174 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shubham_borole

I wasn't able to change the date commented while migrating. But added new property that reflected actual commented date. I used that in my comments component hbs file to display correct date

3 replies

Shubham_borole
Shubham_boroleAuthorAccepted solution
New Participant
June 23, 2017

I wasn't able to change the date commented while migrating. But added new property that reflected actual commented date. I used that in my comments component hbs file to display correct date

Employee
May 5, 2017

Hi Snbaem,

As far as I know this can't be done for activities and notifications. Please file a support ticket, if you need further help on this.

Thanks

Shubham_borole
New Participant
May 2, 2017

snbaem wrote...

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

 

 

Anyone has an idea on this? The notifications and activity entries are affected by this!