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

**URL:** <https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094>\
**Category:** General Questions\
**Created:** [January 6, 2025, 2:54pm UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094 "2025-01-06T14:54:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [January 6, 2025, 2:54pm UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/1 "2025-01-06T14:54:15Z")

</div>

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](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/optimized/1X/ae0d94db8726dffeec1ec1cbc0890e534dccb13f_2_690x41.png)

---

<div class="post-metadata">

**Author:** ![Jillani\_Fazal](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jillani_fazal/32/355_2.png) [@Jillani\_Fazal](https://community.exalate.com/u/Jillani_Fazal)\
**Post date:** [January 7, 2025, 10:10am UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/2 "2025-01-07T10:10:26Z")

</div>

Hi @Jacob_Kalaj

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

---

<div class="post-metadata">

**Author:** ![Sonal\_Otwani](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/sonal_otwani/32/392_2.png) [@Sonal\_Otwani](https://community.exalate.com/u/Sonal_Otwani)\
**Post date:** [January 7, 2025, 2:51pm UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/4 "2025-01-07T14:51:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [January 7, 2025, 4:22pm UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/5 "2025-01-07T16:22:30Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Sonal\_Otwani](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/sonal_otwani/32/392_2.png) [@Sonal\_Otwani](https://community.exalate.com/u/Sonal_Otwani)\
**Post date:** [January 7, 2025, 5:24pm UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/6 "2025-01-07T17:24:45Z")

</div>

Thanks @Jacob_Kalaj for the update!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/system/32/3_2.png) [@system](https://community.exalate.com/u/system)\
**Post date:** [January 9, 2025, 6:54am UTC](https://community.exalate.com/t/salesforce-custom-text-field-to-jira-description-needs-html-conversion-in-script/6094/9 "2025-01-09T06:54:38Z")

</div>

Closed on January 9, 2025, 6:54am UTC

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