Data lookup does not work if the property glide.invalid_query.returns_no_rows is set to true


Description

Since the Calgary upgrade, data lookup is no longer working if the system property glide.invalid_query.returns_no_rows is set to true.

This is caused by the code that builds the Data Lookup cache. The code includes a query against the sys_class_name field, but that field does not exist on the dl_definition table and therefore the query returns nothing if the glide.invalid_query.returns_no_rows property is set to true.

You might see in the logs the following type of messages:

09/25/13 17:39:38 (135) D86C4A5D140C9900ED6FFD23809EEFF9 field name 'sys_class_name' not found in table 'dl_definition'
09/25/13 17:39:38 (137) D86C4A5D140C9900ED6FFD23809EEFF9 Loaded the Data Lookup cache in 2 ms
09/25/13 17:39:38 (329) D86C4A5D140C9900ED6FFD23809EEFF9 field name 'sys_class_name' not found in table 'dl_definition'
09/25/13 17:39:38 (331) D86C4A5D140C9900ED6FFD23809EEFF9 Loaded the Data Lookup cache in 2 ms
09/25/13 17:39:38 (517) D86C4A5D140C9900ED6FFD23809EEFF9 field name 'sys_class_name' not found in table 'dl_definition'
09/25/13 17:39:38 (518) D86C4A5D140C9900ED6FFD23809EEFF9 Loaded the Data Lookup cache in 1 ms

Steps to Reproduce

  1. Log on to an instance.
  2. Set the glide.invalid_query.returns_no_rows property to true (create it if necessary).
  3. Open the Incident > Create New module.
  4. Change the Impact or Urgency fields.

    Notice there is no change to the Priority field. In the base system, there is a Data Lookup Definition that should fire when the Impact or Urgency field is changed on an incident.

 

Workaround

This is expected behaviour. As a workaround, activate the Data Lookup and Record Matching Support for Service Catalog plugin, which is on by default for all new instances.

 


Related Problem: PRB590229