When using Reference qualifier in a variable, approval summarizer UI Macro displays null for the variable


Description

Variable Field Value is showing null in Approval Summarizer if a reference qualifier is used in the Variable definition

Steps to Reproduce

  1. Create a catalog item
  2. Create a variable of type Lookup Select Question. In Type specifications enter table : sys_user, lookup Value Field : name,
    • Reference Qualifier :javascript:'sys_idIN'+getManagerUsers();
  3. Order the item.
  4. In The generated RITM, add an approver if not already there.
  5. Open the approval record.
  6. Click on the catalog item name under summary of item being approved. It opens the variable summarizer.
  7. The value of lookup select question is null 

The following exception message will be thrown in system logs:


java.lang.NullPointerException
Caused by error in ftp://gsft_database/summarize_question.5 at line 2
com.glideapp.questionset.LookupSelectQuestion.getCartItem(LookupSelectQuestion.java:271)
com.glideapp.questionset.LookupSelectQuestion.getCurrent(LookupSelectQuestion.java:251)
com.glideapp.questionset.LookupSelectQuestion.addQualifier(LookupSelectQuestion.java:181)
com.glideapp.questionset.LookupSelectQuestion.getDisplayValue(LookupSelectQuestion.java:68)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2585)
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
org.mozilla.javascript.gen.ftp___gsft_database_summarize_question_5_2099._c_script_0(ftp://gsft_database/summarize_question.5:2)
org.mozilla.javascript.gen.ftp___gsft_database_summarize_question_5_2099.call(ftp://gsft_database/summarize_question.5)

 

This PRB and PRB1378100 are caused by same root cause. Both are backported to NP5 as PRB1373648

Workaround

Use reference type variable instead.

The Problem is fixed in Orlando and backported to NP-5


Related Problem: PRB1373648