When response templates contain an HTML field, they do not show in Agent Workspace and throw an error in platform view


Description

When response templates contain an HTML field, they do not show in Agent Workspace and throw an error in platform view

Steps to Reproduce

SETUP:
1. Hop into an OOB Quebec instance
2. Install the Customer Service plugin
3. Create a custom HTML type field on the sn_customerservice_case table
4. Create a Case record
5. Navigate to System Definition > Response Template Configuration
6. Create a new response template on the sn_customerservice_case table and add your custom HTML field to the template body using the 'Select variables' option on the right

Issue 1 (Workspace):
1. Navigate to Agent Workspace and open a Case that will meet the conditions of your response template
2. Click the 'Response Templates' declarative action in the contextual side panel and search for your template. Observe that it does not show up
3. For comparison, navigate back to your response template record and in the template body, replace the HTML field with another field like 'priority.' Go back to Agent Workspace, and observe that the template now shows up

Issue 2 (Platform):
1. Navigate to platform view and open a Case that will meet the conditions of your response template
2. Click the 'Responses' UI action in the upper right corner
3. Click the dropdown and observe that instead of seeing your template, there is a Java error

Workaround

A workaround for this issue is to remove any empty HTML type field from template body or to have some value in that field.

For example all HR Cases have empty 'details' field, the easiest workaround is to remove (${details}) from the Template Body (as it will display an empty value anyway).


Related Problem: PRB1484942