The word 'null' appears on HR Case 'sn_hr_core_case' record when the Instructions field is blank on the 'sn_hr_core_fulfillment_instructions' form


Description

When the Instructions field is blank on the 'sn_hr_core_fulfillment_instructions' form, the word 'null' appears on the HR Case 'sn_hr_core_case' record.

The Instructions field on the 'sn_hr_core_fulfillment_instructions' table is mandatory. This table did not exist prior to New York, but in previous versions this was the 'Fullfilment instructions' field on the 'sn_hr_core_service' table and was not mandatory. Therefore this issue is most likely to appear in records created prior to New York when it was possible to have an empty Instructions field.

Steps to Reproduce

1. Create new 'sn_hr_core_fulfillment_instructions' record.
2. Make sure the 'Instructions' field is blank. You will need to either make this field non-mandatory or export the record, modify the XML, and re-import.
3. Submit the record.
4. Open an HR Case and observe the Fulfillment Instructions section. The text 'null' will display.

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

The workaround to address the issue where 'null' appears if there is no text in fulfillment instructions, in the script include "hr_FulfillmentInstructions" (sys_id: deadb4ef3b0723003585802b13efc4ad), replace lines 75-76 from:
if (ScopedGlideFilter.checkRecord(gr, grInstructionList.condition)){
    instructions += grInstructionList.getValue('instructions'); 

To:
if (ScopedGlideFilter.checkRecord(gr, grInstructionList.condition)){
    if (!grInstructionList.instructions.nil())
        instructions += grInstructionList.getValue('instructions');


Related Problem: PRB1373726