Sync Edited comments (Jira <> Jira)

I added a comment on JIRA1 and it synced correctly to JIRA2
Then edited the comment on JIRA1 and it won’t update and edit in JIRA2

(But if I add the comment on JIRA1, sync to JIRA2 and then edit it on JIRA2 it will sync to JIRA1. But this isn’t what I need)

In the docs of mergeComments:
https://docs.exalate.com/docs/mergecomments-6226066
It’s mentioned that mergeCommetns function will:

Add all the new comments of the replica to the issue comments and prepend the author name to them.
Remove all the removed comments of the replica from the issue comments.
Edit all the existing issue comments that have been changed on the replica and prepend the author name to them.

Can someone help? Maybe there is a bug in the mergeCommetns function?

What are your outgoing and incoming scripts dealing with comments please?

Thanks

The basic
outgoing
replica.comments = issue.comments

incoming
issue.comments = commentHelper.mergeComments(issue, replica)

I just tried it on Jira Cloud, and was unable to reproduce it i.e. the comment did get edited for me on Jira2.
Also, i do not think it is a bug as you are able to get it to work the other way around. I am struggling to think of things to get here, but could be a lot of different things at work:

  • Does you incoming script have any other line dealing with comments possibly?
  • Are you allowed to edit comments on Jira2? Maybe try manually and also via API.

Hope it gives you some ideas?

Thanks
Majid

Hi @Majid
I’m syncing between Jira Cloud and Jira DC, maybe that is the difference?

That is probably it!
Will test and get back to you.
So, I guess the DC side is not updating when you edit the comment on the cloud side?

Actually, I comment on the DC, then it synced to Cloud correctly. Then Edit the DC and it won’t sync correctly to Cloud

1 Like

Let me check this today and get back to you.

I just tested it (albeit on Jira Server instead of DC) but it worked as expected.

Can you check the Remote Replica on the Cloud side to see if the new comment (edited) makes it in there?

And just triple checking, you are able to edit the comments on Cloud manually, right?

Hi
On the cloud & On DC, I’m able to edit by myself, and the proxy user can also.

In the remote replica, I see the comment, with the updated body after the comment edit, also I can see the updated time of the comment is later than the creation date.

My advice would be to create a support ticket with the team as they will need to check logging etc. to see what is going on. What I can confirm is that it is not a bug as I am unable to reproduce it on 3 test systems.