Approval Form does not show the "Comments" text box in KINGSTON UI16 after upgrade

IanGlencross
Kilo Expert

We are upgrading from ISTANBUL to KINGSTON, and have come across an issue with Change approvals.

Opening a Change Record that is pending approval  :  the next step in our workflow is for an approver to approve the change  

This can be done by either

  1.    clicking on the UI Action  “Approve or Reject “  or
  2.    opening the Approval task in the Approvers tab of the change
  3.    choosing from My approvals

 

When you do this in Istanbul, either in UI15 or UI16 you get the default Approval Form, whcih contain a text box for entering comments

 

 In KINGSTON when in UI15 the result is the same ...

... but when in UI16 the following form is rendered

Which is missing the comments box– and as comments are mandatory for REJECTthis is an issue.

 

Notes

  • Even in UI16 opening the form in  FORM DEISGNER (see below) shows the comment field as included in the form, however it is not rendered
  • Tested in both Chrome v65 and IE11 and same issue exists.
  • Issue is NOT restricted to Change – also occurs in Approval task for Knowledge

 

 

 

 

Does anyone have any idea where to start looking at this issue?

 

 

 

6 REPLIES 6

IanGlencross
Kilo Expert

Update : 

 I have run up a new DEV instance of Kingston  - and this UI16 approval form issue does not exist

 To help debug I accessed the same record using the same direct URI in the WORKING (dev26782) and BROKEN(dev37128) instances  : 

https://<INSTANCE>.service-now.com/nav_to.do?uri=/sysapproval_approver.do%3Fsys_id%3Dd77f1c43c0a8016700fb35cc71a9b5cb

 

WORKING :

find_real_file.png

BROKEN :

find_real_file.png

 

Looking at the HTML of the two systems they are identical until they get to the part where this text box is presented :

 

In the WORKING VERSION the code uses a class "sn-form-stream-init"  and then uses angular to generate the text box form

find_real_file.png

 

In the BROKEN VERSION the code does not use the same class, and does seem to pull the same inline scripts or use much angular

find_real_file.png

 

 

IN SUMMARY

I assume that this form was upgraded to the new format, and that as we had customised ( added the "reject"  UI Action )  this form wasn't updated.  However I have gone through the skipped items in the upgrade history and cannot find any reference to this.

So  ... has anyone else had this issue after upgrading : and how did you fix it?

Is it going to be easier to generate a new form in Kingston and use that?

 

 

 

IanGlencross
Kilo Expert

Further Update

 

I found this UI Policy - it's old but it seems to describe what is happening:

"Check for presence of new document_id field. If it is not on form, display the legacy sysapproval form."

The only issue is that the UI Policy is the same on both systems, and the conditions it's testing  are also the same

The fields in focus are  g_form.hasfield('document_id') and g_form.hasfield('sysapproval') and document_id is the field "Approving" and sysapproval is the field "Approval for"

 

find_real_file.png

 

So .. if this is the cause of the issue could be that  the Approving  field is not on the form (it is not visible in either WORKING or BROKEN, but is included in the form design of both) 

 find_real_file.png

 

 

IanGlencross
Kilo Expert

SOLUTION

 

This issue is caused by the glide.ui16.live_forms.enabled being set to false.

When set to true, it will show the comment fields on the sysapproval_approver record when viewed in UI16.

The reason it may have been set to false is that in past releases (Helsinki in our case), you could not separate the comments and work notes in their own tabs and by having this property set to false, you could achieve that.

 

Thanks to Aaron Chhor from SNC on finding this solution

UPDATE TO SOLUTION

 

This solution creates a new issue : the Comment Field has a "POST" button that can interfere with the UI Actions normally used on the form.

find_real_file.png

To disable this seems very difficult (there is no sys_property available), so I have hidden it using a client script :

 

function onLoad {

// the "sn-controls" class is used to contain the section of the form where the POST button is shown. 

// On this form, for this table, no other element uses this class so hiding in this manner has no unintended effects.  



$j(".sn-controls").hide();

}