Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038489Openbravo ERPA. Platformpublic2018-05-03 18:032018-06-01 09:33
airaceburu 
caristu 
normalminoralways
closedfixed 
5
pi 
pi3.0PR18Q3 
alostale
Core
No
0038489: Wrong displayed value of a table reference inside a pick and execute when using hql query
The displayed value of a foreign key shown in a pick and execute is showing the table identifier instead of the one selected.

This happens when the pick and execute is populated from a hql query and the reference of the column is a table.
This is an example to get the above situation quickly with retail sampledata:

0) As System Administrator, go to [Reference window]. In "C_Region" Table reference, change the "Displayed Column" to Description instead of showing the name. Restart the application.
1) Go to Organization window, select Central Mountains Store and click on the button "Choose CC Warehouse".
2) Note that the value displayed in the P&E window for the region field is the name of the region instead of its description.
Patch attached
No tags attached.
related to defect 00164653.0RC7 closed mtaal Combos on new ui doesn't show the record identifiers 
related to defect 00279123.0PR14Q4 closed AugustoMauch DateTime fields not properly formated to local time zone in grids of parameter windows 
diff proposedSolution.diff (984) 2018-05-03 18:03
https://issues.openbravo.com/file_download.php?file_id=11776&type=bug
Issue History
2018-05-03 18:03airaceburuNew Issue
2018-05-03 18:03airaceburuAssigned To => platform
2018-05-03 18:03airaceburuFile Added: proposedSolution.diff
2018-05-03 18:03airaceburuModules => Core
2018-05-03 18:03airaceburuResolution time => 1526508000
2018-05-03 18:03airaceburuTriggers an Emergency Pack => No
2018-05-29 10:23caristuRelationship addedrelated to 0016465
2018-05-29 10:29caristuRelationship addedrelated to 0027912
2018-05-29 12:34caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17214#r17214
2018-05-29 12:43caristuAssigned Toplatform => caristu
2018-05-29 12:55caristuNote Added: 0104766
2018-05-29 12:55caristuNote Edited: 0104766bug_revision_view_page.php?bugnote_id=0104766#r17216
2018-05-29 13:05hgbotCheckin
2018-05-29 13:05hgbotNote Added: 0104768
2018-05-29 13:06caristuStatusnew => scheduled
2018-05-29 13:06caristuStatusscheduled => resolved
2018-05-29 13:06caristuFixed in SCM revision => 71b2155a083e
2018-05-29 13:06caristuResolutionopen => fixed
2018-05-29 13:07caristuReview Assigned To => alostale
2018-05-29 13:07caristuFixed in SCM revision71b2155a083e => https://code.openbravo.com/erp/devel/pi/rev/71b2155a083e [^]
2018-05-30 00:14hudsonbotCheckin
2018-05-30 00:14hudsonbotNote Added: 0104791
2018-06-01 09:33alostaleNote Added: 0104857
2018-06-01 09:33alostaleStatusresolved => closed
2018-06-01 09:33alostaleFixed in Version => 3.0PR18Q3

Notes
(0104766)
caristu   
2018-05-29 12:55   
Repository: erp/devel/pi
Changeset: 71b2155a083e
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue, 29 May 2018 12:36:13 +0200
URL: https://code.openbravo.com/erp/devel/pi/rev/71b2155a083e [^]

fixes bug 38489: Display field of table reference can't be retrieved by some DS

Some datasources (like those extending ReadOnlyDataSourceService) use the DataToJsonConverter.convertToJsonObjects() method to return its result. When converting BaseOBObjects this method was not using the related Property to place its corresponding value into the resulting JSON.

Now we make use of the Property, this allows to retrieve the "Display Field" if the Property is a table reference, when invoking the DataToJsonConverter.addBaseOBObject() method.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
---

(0104768)
hgbot   
2018-05-29 13:05   
Repository: erp/devel/pi
Changeset: d9439b0b660be69fe52a0a352e8803c2c3214016
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 29 12:59:42 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d9439b0b660be69fe52a0a352e8803c2c3214016 [^]

related to bug 38489: Minor code improvements in convertToJsonObjects method

  - Use diamond operator
  - Iterate over the entrySet instead of the keySet
  - Removed useless comment

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
---
(0104791)
hudsonbot   
2018-05-30 00:14   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/08f13cf1fa33 [^]
Maturity status: Test
(0104857)
alostale   
2018-06-01 09:33   
reviewed + tested