Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038435Openbravo ERPA. Platformpublic2018-04-24 13:152022-02-01 08:08
aferraz 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0038435: ad_get_preference_value function shows a warning: record "selpref" is not assigned yet
ad_get_preference_value function shows a warning: record "selpref" is not assigned yet
Run pgpgsql-check and check for ad_get_preference_value warning.
No tags attached.
related to defect 0037481 closed shuehner unused PL variables - platform 
diff 38435.diff (825) 2018-04-24 13:21
https://issues.openbravo.com/file_download.php?file_id=11763&type=bug
? 38435.hgexport (6,153) 2018-04-25 12:45
https://issues.openbravo.com/file_download.php?file_id=11767&type=bug
Issue History
2018-04-24 13:15aferrazNew Issue
2018-04-24 13:15aferrazAssigned To => platform
2018-04-24 13:15aferrazModules => Core
2018-04-24 13:15aferrazTriggers an Emergency Pack => No
2018-04-24 13:20aferrazNote Added: 0104053
2018-04-24 13:20aferrazNote Edited: 0104053bug_revision_view_page.php?bugnote_id=0104053#r17049
2018-04-24 13:21aferrazFile Added: 38435.diff
2018-04-24 13:23aferrazRelationship addedrelated to 0037481
2018-04-24 15:42alostaleAssigned Toplatform => alostale
2018-04-25 12:45alostaleFile Added: 38435.hgexport
2018-04-25 12:48alostaleNote Added: 0104074
2018-04-25 12:48alostaleAssigned Toalostale => platform
2018-04-25 12:48alostaleStatusnew => acknowledged
2018-06-15 11:37alostaleNote Added: 0105177
2018-06-15 11:37alostaleTypedefect => design defect
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0104053)
aferraz   
2018-04-24 13:20   
Attached fix makes PreferenceTest to fail: https://ci.openbravo.com//job/try-checks-oracle/6773/ [^]

(0104074)
alostale   
2018-04-25 12:48   
Attached WiP version.

As it is, it works in ORA but not in PG:

selPref := null;
...
if (selPref.ad_preference_id is null) ...

Changing it to

selPref := null;
...
if (ad_preference_id is null) ...

Works in PG but not in ORA.

In addition beacuse of DBSM translation, selPref ad_preference%ROWTYPE is converted to selPref RECORD, this causes pg_checks to complain about unknown columns in generic record.
(0105177)
alostale   
2018-06-15 11:37   
Moved to design defect:
* there's no a simple way to write a code working both in Oracle and PostgreSQL
* this case is already white listed in CI