Comments not synching between Jira Service Management and a Jira development board

I’m having an issue where the comments on our Jira Service Management tickets aren’t synching when we Exalate the ticket to another Jira Project board.

This is only happening from JSM to Jira, the comments added on the Jira project side are successfully coming back into the ticket as internal comments.

The synching of the comments from the JSM side worked when we initially set up the connection, but now seems to have stopped working.

Does anyone know how we can resolve this?

It sounds like your comments from Jira Service Management (JSM) are no longer syncing to your Jira development board, even though the sync works in the other direction. This is a common scenario, especially with JSM’s internal/public comment handling.

Here are the key things to check and steps to resolve:

  1. Outgoing Sync Script on JSM Side
    For JSM, you need to ensure that your outgoing sync script is correctly filtering and sending the right comments. To sync only public comments, your script should look like this:

    replica.comments = issue.comments.findAll { !it.internal }
    

    If you want to sync all comments (including internal), you can adjust the filter accordingly.

  2. Customer Request Type Must Be Set
    Exalate relies on the JSM “customer request type” to identify and process comments correctly. If this field is missing or not set on your issues, comment syncing can break. Double-check that all your JSM issues have a request type assigned.

  3. Webhook Processing for Comments
    If updating comments in JSM doesn’t trigger a sync, you might need to enable webhook processing for comments. This sometimes requires Exalate support to enable a variable on your node. If you suspect this is the case, you can reach out to Exalate support directly: support@exalate.com.

  4. Reference Documentation

Summary:

  • Check your outgoing sync script on the JSM side.
  • Make sure the “customer request type” is set on all JSM issues.
  • If the problem persists, contact Exalate support to ensure webhook processing is enabled for comments.

This should help you get your comment sync working again!

Hi @Lexiecolston22

Jillani here and thank you for connecting with us on our Community portal. :slight_smile:

May I know if the shared information by AIDA was helpful or further assistance is required?

Regards,

Jillani

Hi Jillani,

Thanks for getting back to me.

I’ve checked the outgoing script and it contains the ‘replica.comments’ line suggested in the first point, the customer request type is also set so I don’t think that is the issue either.

It might be the webhook processing, in which case we might need your support to enable the variable. Should I email the support email?

Thanks,

Lexie

Hi @Lexiecolston22

Thanks for the update.

Before opening up a support ticket, would it be possible for you to share the Outgoing and Incoming Script from both sides of the connection (in case not a local connection) so that I can check?

Hi Jillani,

Sure, here is the script:

Outgoing:

// Jira issues are now work items. The term “issues” in the code below works despite this change.
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments.findAll { it.internal }
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project

/*
Uncomment these lines if you want to send the full list of versions and components of the source project.
replica.project.versions =
replica.project.components =
*/

/*
Custom Fields (CF)
How to send any field value from the source side to the destination side.
1/ Add the value to the replica object using the Display Name of the specific field.
2/ Uncomment this next statement out and change accordingly:
replica.customFields.“CF Name” = issue.customFields.“CF Name”
*/

// Exalate API Reference Documentation:

Incoming:

if (firstSync) {
issue.projectKey = “CS”
}
issue.type = nodeHelper.getIssueType(replica.type?.name, issue.projectKey) ?: nodeHelper.getIssueType(“Task”, issue.projectKey)
issue.summary = replica.summary
issue.description = replica.description
// Merge comments and set all as internal
issue.comments = commentHelper.mergeComments(issue, replica) { it.internal = true; it }
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels

/*
Custom Fields (CF)
To add incoming values to a Jira custom field, follow these steps:
1/ Find the Display Name of the CF. Note: If you have multiple custom fields with the same name,
then you can sync it using the custom field ID instead of its name. Know more about the steps here:

2/ Check how the value is coming over from the source side, by checking the “Entity Sync Status”
of an issue in sync and then selecting the “Show Remote Replica”.
3/ Add it all together like this:
issue.customFields.“CF Name”.value = replica.customFields.“CF Name”.value

*/

/*
Status Synchronization
For Status sync, we map the source status, to the destination status with a hash map.
The syntax is as follows:
def statusMap = [
“remote status name”: “local status name”
]
Go to Entity Sync Status, put in the entity key, and it will show you where to find the remote replica
by clicking on Show remote replica.
def statusMap = [
“New” : “Open”,
“Done” : “Resolved”
]
def remoteStatusName = replica.status.name
issue.setStatus(statusMap[remoteStatusName] ?: “Add a default status in these double quotes”)
*/

/*
User Synchronization (Assignee/Reporter)
Set a Reporter/Assignee from the source side. If the user can’t be found, set a default user.
You can also use this approach for custom fields of the type User
def defaultUser = nodeHelper.getUserByEmail(“default@exalate.com”)
issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser
*/

/*
Comment Synchronization
Impersonate comments with the original author. The sync will work if the user already exists
in the local instance.
Note: Don’t forget to remove the original comments sync line if you are using this approach.
issue.comments = commentHelper.mergeComments(issue, replica) {
it.executor = nodeHelper.getUserByEmail(it.author?.email)
}
*/

// Exalate API Reference Documentation:

Thanks

HI @Lexiecolston22

Much appreciated - Let me have this checked and will be getting back to you.

HI @Lexiecolston22

I have checked and here is the script as far as the syncing of comments are concerned.

Your Script Review

Outgoing (JSM):

replica.comments = issue.comments.findAll { it.internal }
  • This line only sends internal comments from JSM to Jira.

Incoming (Jira):

issue.comments = commentHelper.mergeComments(issue, replica) { it.internal = true; it }
  • This merges incoming comments and sets them as internal on the Jira side.

  • Your outgoing script only syncs comments where it.internal is true. If your JSM agents are adding public comments, they won’t sync.

May I know if you are syncing only the internal comments?

Hi Jillani,

Thanks for checking this for me.

I think we wanted this to work the other way around, so:

  • Customer and internal comments sync from JSM to Jira
  • Any comments added from Jira side are shown on the JSM side as internal comments only so that agents can see them but not customers

Does that make sense?

Thanks,

Lexie

HI @Lexiecolston22

Appreciate the update. Let me have this checked/tested and will get back to you with information.

Regards,

Jillani

HI @Lexiecolston22

Appreciate your patience as it took me a while before getting back to you here.

I have checked/reviewed the script thoroughly and see that in your In your outgoing sync script (JSM side), you have:

replica.comments = issue.comments.findAll { it.internal }

This line only syncs internal comments from JSM to Jira. Customer comments (public) are being filtered out and not sent at all. That’s why only internal comments are syncing from JSM to Jira, and customer comments are missing.

To sync all comments (both internal and customer), change:

replica.comments = issue.comments.findAll { it.internal }

to:

replica.comments = issue.comments

It’s possible that the script was changed at some point, or the initial setup didn’t have the .findAll { it.internal } filter. That filter is what’s causing only internal comments to sync.

Here is a useful article regarding this:

Please check and let me know the outcome.

Hi Jillani,

That has worked and the customer comments are now visible again.

Thanks for your help with this!

1 Like

Hi @Lexiecolston22

Sounds great and glad that I was able to share the solution. :slight_smile:

Feel free to open a new post if something else comes up in regards to the scripting as we are always here to help.

Happy Exalating!