HR Case Description Formatting Issues After Utah Upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 09:36 AM
We are in the process of upgrading to Utah. During our testing, we have had an issue with how the description field is being formatted on HR Cases.
We are using the rich_description field on HR Cases, but there are different formatting issues occurring on both the description and rich_description fields.
In the description field, apostrophes are showing as "'".
In the rich_description field, there are no line breaks being added, so the ticket details end up just looking like a big text block.
Do you have any idea what might be causing this or where to find where this is being formatted? I have looked through business rules and script includes to try and find where this occurring but have not had any luck.
Thank you,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:58 AM
@JayGervais , @Community Alums
We heard back from the Support team. Their response is below and the workaround fixed the issue.
Most Probable Cause:
- You are experiencing known defect PRB1648026
- This PRB is affecting the Utah version and is fixed in the upcoming Vancouver release.
Solution Proposed:
Please follow below workaround for this issue:
open script include "hr_CaseUtils"
/sys_script_include.do?sys_id=24c782869f202200d9011977677fcf89
Comment out the line 129
'this._case.rich_description = this._case.description;'
So it will look like:
this._case.description = this._getDescriptionFromAnswers(questions, serviceValue);
//this._case.rich_description = this._case.description;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 02:47 PM
Thanks for this keithgange.
I had a similar response from ServiceNow. They provided me with a workaround of disabling the "Sync rich_description with description" and "Sync description with rich_description" business rules. I attempted this and it actually made things worse so I created my own workaround that we have been using until a real fix comes out.
I created a before insert business rule with this script:
(function executeRule(current, previous /*null when async*/) {
var desc = current.description;
var updDesc = desc.split("'").join("'");
current.description = updDesc;
var lines = desc.split("\n");
var rich_description = lines.map(function(line) {
return '<p>' + line + '</p>';
}).join("");
current.rich_description = rich_description;
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 03:50 AM
Thanks for the reply, we also discovered a workaround which is to Change the data type of "rich_description" field from "HTML" to "String".
Thanks,
Anu
