The BROWSE-ONLY query in NSQL is not working correctly
search cancel

The BROWSE-ONLY query in NSQL is not working correctly

book

Article ID: 6941

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Steps to Reproduce:
 
1. Create a lookup that uses both an attribute parameter and a browse only
like below

SELECT
@SELECT:inv.name:[email protected]
,@SELECT:inv.name || ' - ' ||
NVL2(inv.is_active,'ACTIVE','INACTIVE'):[email protected]
,@SELECT:p.obj_request_type:[email protected]
,@SELECT:inv.is_active:[email protected]
FROM
INV_INVESTMENTS INV
INNER JOIN ODF_CA_PROJECT P on inv.id=p.id
WHERE
1=1
AND
p.obj_request_type= @WHERE:PARAM:USER_DEF:STRING:[email protected]
@BROWSE-ONLY:
AND inv.is_active=1
:[email protected]

2. Create a new project attribute based upon the lookup
3. add the new attribute to a page
4. On Project A for the new field select Project X (which is active) and save
5. Project X shows up properly in the in the field
6. Now go to Project X and make the project inactive & save
7. Return to Project A and refresh the page and notice the field is now
blank. It should not be because it should not care about the browse only

Expected Result: field shouldn't be blank

Actual result: field is blank

Environment

Release: 451-101-15.1-Clarity-Creator User License
Component:

Cause

This is caused by CLRT-69512.

 

Resolution

After a careful review on the defect by Sustaining Engineering, it has been decided to close it as Will Not Fix

Additional Information

InstanceAttributeService is the place where values for the attributes will be fetched and getSelectValues() method serves for attributes whose data type is lookups.
Take a case of a Dynamic lookup that has 6 values and the NSQL query has BROWSE_ONLY with is_active as 1.
So one can select only active values when selecting values for the attribute.

What is happening is, in getSelectValues() method, LookupController  getDynamicLookupValues() method is called with force parameter as false. A false as the force parameter returns only active values, and only displaying active saved values rather than all the saved values(ACTIVE|INACTIVE)