Salesforce Custom Text Field to JIRA Description needs HTML Conversion in Script

So I have Connected a Rich Text Salesforce Field to our JIRA Description Field. However the issue is when the data comes into JIRA it converts it to HTML format making it hard to read and the pictures come as embedded URLs instead of images. Is there a way to introduce a line of groovy that will fix this ?

SFDC OUTGOING

if(entity.entityType == “Case”) {
replica.key = entity.Id
replica.summary = entity.Jira_Title__c
replica.description = entity.Jira_Summary__c
replica.comments = entity.comments
replica.attachments = entity.attachments
replica.Jira_Account__c = entity.Jira_Account__c
}

JIRA INCOMING

if (firstSync) {
issue.projectKey = “ST”
// Set the same issue type as the source issue. If not found, set a default.
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: “Bug”
}

issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.customFields.“Client Impacted”.value = nodeHelper.createOption(issue, “Client Impacted”, replica.“Jira_Account__c”)

Screenshot of JIRA

Screenshot 2025-01-06 at 7.56.01 AM

Hi @Jacob_Kalaj

May I know if it is Jira on Cloud or Jira on Prem/DC?

Hey @Jacob_Kalaj

Can you please try to replace this line in your jira incoming sync script:
issue.description = replica.description
with:
issue.description = nodeHelper.toMarkDownFromHtml(replica.description)

Waiting for your update!

Thanks,
Sonal

Thanks @Sonal_Otwani , will be testing this with the teams over the next hr or so, initial connections look good. Once confirmed will mark your line as the solution, appreciate your input!

Thanks @Jacob_Kalaj for the update!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.