[MNT-18232] Display value field shows Unicode reference for non-english characters Created: 30-Jun-17  Updated: 03-Sep-20

Status: Open
Project: Service Packs and Hot Fixes
Component/s: APS Kickstart/Studio
Affects Version/s: Alfresco Process Services 1.6.2, Alfresco Process Services 1.6.4.2
Fix Version/s: None

Type: Service Pack Request
Reporter: Lei Wang [X] (Inactive) Assignee: Mark Howarth
Resolution: Unresolved Votes: 0
Labels: Berlin, Modeler-Form
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 1.6.4.2ExampleEditorFormDisplaySelectingOtherSpecialCharlableedFormField.png     PNG File Screen Shot 2018-05-29 at 5.40.30 AM.png     File displayValue.mp4     PNG File image-2018-05-23-10-16-03-491.png     XML File testdisplay.bpmn20.xml     XML File web.xml    
Issue Links:
Dependency
Related
relates to MNT-18239 Task form attachment field can´t hand... Open
is related to by MNT-20404 Validation of form with display value... Open
is related to by MNT-18832 Tenant events in Identity Management ... Open
is related to by MNT-19647 Form Display Value fields conflict ev... Closed
Shadow
Bug Priority:
Category 3
ACT Numbers:

00876041, 00942516, 01011783


 Description   

Summary
Display value field shows Unicode characters for non-english characters (e.g. Chinese) in field labels.

Steps to reproduce

  1. Via App Designer create a simple process (start event -> user task -> end event)
  2. Create a form for the start event
  3. Drop 'Text' field in the form then edit the text field and modify the label to a Chinese label
  4. Click 'Override ID'
  5. Modify ID to 'label1' and save form
  6. Add another form to the user task and add a 'Display value' field
  7. Edit the display value field and inspect the available field options to display

Current Behavior
Display value field shows unicode characters for the field label value

Expected Behavior
The label should be displayed properly in Chinese.

Supporting evidence

  • Reproduced with latest APS 1.6.2 release
  • Attached the video and my test process to demo the issue.
  • Japanese label has the same problem


 Comments   
Comment by Jennie Soria [X] (Inactive) [ 19-Sep-17 ]

Reproducible in 1.6.4.2 APS

This issue is explicitly with the rendering of the text for the 'Show value of label' while setting up/editing a form where you display the value from another field's label.

  • characters display correctly when you create form and set the label for that
  • characters display correctly when process is running (labels and values of form fields)

Characters just not encoded in the form 'editor' view for the 'display value' field when you select a form field where the label is in Chinese/Japanese or other similar encoded languages.

Looks to be related to ./activiti-bpm-suite/activiti-app/src/main/webapp/editor/views/templates/form-builder-element-template.html

Comment by Doug Johnson [X] (Inactive) [ 25-May-18 ]

The development team has proposed a work around prior to this being formally fixed in the product:

1. Open /tomcat/webapps/activiti-app/editor/views/templates/form-builder-element-template.html
2. Apply a AngularJS directive instead of a AngularJS HTML Template Binding like so
 

<div class="message">
        {{formElement.params.field.name && ('FORM-BUILDER.MESSAGE.FIELD-VALUE' | translate:formElement.params.field) || ('FORM-BUILDER.MESSAGE.SELECT-FIELD' | translate)}}
      </div>

The about uses HTML Template Binding, if changed to use directives the issue will be resolved

<div class="message">
        <span ng-if="formElement.params.field.name" translate="FORM-BUILDER.MESSAGE.FIELD-VALUE" translate-values="formElement.params.field"></span>
        <span ng-if="!formElement.params.field.name" translate="FORM-BUILDER.MESSAGE.SELECT-FIELD"></span>
      </div>

Using a directive instead will work fine as in

This pattern can be used to solve other similar issues related to unicode character display.

Comment by Bassam Al-Sarori [ 29-May-18 ]

Seems that both fields have the same id (since Japanese is used the id isn't auto generated from the form field label instead 'field1' will be used by default). Changing the field id is possible by editing the form field and checking "Override ID?" and specifying a unique id for each field.

Comment by Mark Howarth [ 23-Aug-19 ]

Reassigning to Doug Gruber, the new PM for APS.

Comment by Mark Howarth [ 02-Dec-19 ]

Assigning to Mark Howarth as PM for APS.

Generated at Sat Sep 19 23:30:06 BST 2020 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.