Adding comment to AdditionalComments in ServiceNow - not work log

I’m attempting to add a field from Jira into the AdditionalComments in the ServiceNow ticket. The following code from Aida looks like it should work, but the comment still shows up as a worklog and not an additional comment

release_note is defined prior to this as a string

entity.comments = commentHelper.addComment("Release Notes: ${release_note}", false, entity.comments)

To add a comment from Jira into the AdditionalComments field in ServiceNow (and not as a work note), you need to ensure that the comment is being added as a public comment. In ServiceNow, the distinction between Additional Comments (public) and Work Notes (private) is controlled by a flag in the comment helper.

The code you shared uses the following line:

entity.comments = commentHelper.addComment("Release Notes: ${release_note}", false, entity.comments)

The second parameter in addComment determines whether the comment is a work note (true) or an additional comment (false). Setting it to false should add it as an Additional Comment.

If the comment is still appearing as a work note, double-check the following:

  1. Make sure you are using the correct field (entity.comments) for Additional Comments. For ServiceNow, entity.comments is used for Additional Comments, and entity.workNotes is used for Work Notes.
  2. Ensure that your ServiceNow connection is set up correctly and that the sync rules are being applied as expected.
  3. If you are using a custom field mapping, verify that there are no overrides or custom logic elsewhere in your sync rules that might be affecting how comments are handled.

You can find more details in the documentation here:
https://docs.exalate.com/docs/sending-comments-to-servicenow

If you continue to see the comment as a work note, try explicitly using the entity.comments field and confirm that no other part of your sync rules is modifying the comment type after this line.

Let me know if you need more details on mapping comments or troubleshooting this behavior!

the recommended line is virtually identical to what I’m already using

Hi @apaeth

Can you try this following solution?

 entity.comments = commentHelper.addComment(entity.comments) { comment ->
       comment.body     = "Release Notes: ${release_note}"
       comment.internal = false
 }

Let me know in case of any further concerns.

Thanks,

Sonal

Hi @apaeth

Can you please update if provided solution worked or not?

Thanks,

Sonal