Jira Spoke Comment field not coming over as rich text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2020 05:47 AM
Hi,
We are working on a Jira issue integration using IntegrationHub and Jira Spoke v2.6.8 and cannot get the comment field to come into ServiceNow with correct format. On the OOTB action, its assuming the field is a string field and doesnt allow for rich text.
We also are having problems getting a comment in ServiceNow to copy correctly into Jira's comment field using the action provided. We modified the action, setting the comment field to HTML since Jira's comment field is actually HTML on their system so we can send rich text. Here are some pictures of what we're seeing:
1. Here's our action and a pic of what we're sending
2. Here's what is received on Jira:
3. Here's what it should be capable of passing back and forth:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2020 05:33 AM
Try to script the outbound value from ServiceNow to strip away "[code]" and HTML tags.
var comment = fd_data.trigger.current.comments.replace(/\[code\]|\[\/code\]/g, '').replace(/<[^>]*>/g, '');
return comments;