Row price from Multi-Row Variable Set is not added to the total price if using current.variables.variable_name in the Lookup Select Box reference qualifier


Description

Row price from Multi-Row Variable Set is not added to the total price on service portal if using current.variables.variable_name in the Reference qualifier of Lookup Select Box variable. The type of Choice Type "current.variables.variable_name" needs to be defined as Choice type in the dictionary entry. The localhost log shows the value current.variables.test_category is passed to the Script Include correctly and the price is added to the Price of the Catalog item.

Steps to Reproduce

1. Create a Choice type dictionary entry "Test Category" on the "cmdb_consumable_product_model" table.

2. Add two Choices to the dictionary "Test Category".
Choices:
Label: IBM
Value: ibm
Lebel: MAC
Value: mac

3. Set Test Category of some "cmdb_consumable_product_model" records to IBM and MAC.

4. Create a Script Include "TestMRSVPrice" inserting the following script:
getMyURL:function(category){
gs.info('test_category: ' + category);
return 'u_test_category=' + category;
},

5. Create a Catalog Item "Test Price" and set Price to $0.01.

6. Create a Multi-Row variable set "Consumable Models".

7. Create two variables in the variable set:

Type: Select Box
Question: Test Category
Name: test_category
Choice table: cmdb_consumable_product_model
Choice field: Test Category
Include none: true
Unique values only: true

Type: Lookup Select Box
Question: Display name
Name: display_name
Lookup from table: cmdb_consumable_product_model
Lookup value field: Display name
Lookup price field: Cost
Include none: true
Reference qualifier: javascript: new TestMRSVPrice().getMyURL(current.variables.test_category);

8. Click to open this Catalog Item "Test Price" on Service Portal.

9. Click to add one row:
Test Category: IBM
Display name: any available option

Observe the Price of the Catalog Item does not get updated.

Workaround

This problem has been fixed. There is no workaround available. 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.


Related Problem: PRB1359853