Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Comments- How to sync the original creation date of the comment

 
2
1
0

Hi there, 

What is the best way to insert the original creation date of the comment in the synchronised comment? Right now it just shows the name of the comment author and comment text, for auditability reasons it would be beneficial to also have the original creation date. Is this possible?

Thanks, 

Mena

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Mena Goyen


      You can easily modify the formatting of the receiving comment.  For instance

      (the code can be found here)

      • Line 1 - calls the mergeComments method
        the third argument is a closure which gets executed for each comment that is in the replica

      • Line 3,4,5,6 set the comment body
        to a combination of the displayName, the created date, and the body

      • Line 4 - comment.created?.format()
        Format the comment created date to day-month-year

      • Line 5 - insert a new line


      1. Mena Goyen

        Thanks that worked, if we also wanted the time stamp how would we add that?

      2. user-3fd1a

        Check the format specs here

        I didn't try it but something like 'HH:mm:ss'  should do it.



      3. Jorge Jerez Ibáñez

        Hi


        Is there any way to sync the created date of the commnets?

      CommentAdd your comment...