Remove HTML in Jira ticket?

Originally asked by Mihai Arama on 08 April 2022 (original question)


Hello,

We are using a synchronization between Service-Now and Jira (server).

In service now we have a field which contains html, and we are able to exalate the value over to jira, to the description field, but it looks like this:

<div style=“display: none;”>--BEGIN--</div>
<p> </p>
<p> </p>
<div style=“display: none;”>--END--</div>
<div style=“display: none;”>--BEGIN_1--</div>
<p> test</p>
<div style=“display: none;”>--END_1--</div>

The outgoing code in Service-Now looks like this:

        replica.description_html        = entity.u_description_html

The incoming Jira code looks like this:

    issue.description  = replica.description_html

I’ve found that for cloud this may be a solution: https://docs.idalko.com/exalate/display/ED/toMarkDownFromHtml .

It doesn’t seem to be available on server.

Please let me know if there is a solution to avoid that unnecessary text transfer.

Thank you!


Answer by Syed Majid Hassan on 25 April 2022

Hi Mihai,

I believe you can just use stripHtml in order to get rid of the HTML formatting:
https://docs.idalko.com/exalate/display/ED/stripHTML

e.g.: Outgoing on ServiceNow:

        replica.description_html        = nodeHelper.stripHtml(entity.u_description_html)

But if you would like to pursue a more professional solution, please review the following:
https://community.servicenow.com/community?id=community_article&sys_id=5566161fdb3264103daa1ea668961981

Please let me know if you have any questions.

Thanks

Majid


Comments:

Mihai Arama commented on 27 April 2022

Thank you very much, Syed Majid Hassan , I missed that one in the documentation.

Best regards,

Mihai

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