Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033003Openbravo ERPA. Platformpublic2016-05-19 17:472016-08-11 18:40
JONHM 
NaroaIriarte 
normalminoralways
closedfixed 
5
 
3.0PR16Q43.0PR16Q4 
alostale
Core
No
0033003: Wrong titles exported to CSV when using a property field
When using a property field to define a column on a window, the names of the columns with this properties are exported incorrectly.
1) Create a window associated with C_OrderLine table and add two columns with the properties "salesOrder.partnerAddress.name" and "salesOrder.invoiceAddress.name", named "Ship Order Details" and "Sales Order Details" respectively, and name this window "Sales Order Details".
2) Add that window to the menu.
3) Go to "Sales Order Details" window
4) Export to CSV

Notice that some names related to property fields are exported incorrectly.

*** Window created in attached module
The problem is caused because finally both property fields are referencing exactly the same physical column.

Because of the following line[1], the second property field is retrieving exactly the same name as the first one.

At that point perhaps a special check for the property fields should be performed.


[1] https://code.openbravo.com/erp/devel/pi/file/18ae3b2d8cb2/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java#l442 [^]
No tags attached.
? org.openbravo.changenames-1.0.0.obx (6,812) 2016-05-19 17:47
https://issues.openbravo.com/file_download.php?file_id=9426&type=bug
? issue33003.export (2,656) 2016-06-29 18:11
https://issues.openbravo.com/file_download.php?file_id=9599&type=bug
Issue History
2016-05-19 17:47JONHMNew Issue
2016-05-19 17:47JONHMAssigned To => platform
2016-05-19 17:47JONHMFile Added: org.openbravo.changenames-1.0.0.obx
2016-05-19 17:47JONHMModules => Core
2016-05-19 17:47JONHMTriggers an Emergency Pack => No
2016-05-24 18:36johnfandlNote Added: 0086714
2016-06-21 16:58caristuProposed Solution updated
2016-06-21 16:58caristuStatusnew => acknowledged
2016-06-23 10:10NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-06-27 13:11NaroaIriarteStatusacknowledged => scheduled
2016-06-29 12:32NaroaIriarteFile Added: issue33003.export
2016-06-29 16:14caristuTarget Version => 3.0PR16Q4
2016-06-29 18:11NaroaIriarteFile Deleted: issue33003.export
2016-06-29 18:11NaroaIriarteFile Added: issue33003.export
2016-07-04 12:36hgbotCheckin
2016-07-04 12:36hgbotNote Added: 0088172
2016-07-04 12:36hgbotStatusscheduled => resolved
2016-07-04 12:36hgbotResolutionopen => fixed
2016-07-04 12:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f95207ec63c82ea1dcdb06a3ee8556d8a7d451c4 [^]
2016-07-07 09:17NaroaIriarteReview Assigned To => alostale
2016-07-08 08:53hgbotCheckin
2016-07-08 08:53hgbotNote Added: 0088315
2016-07-08 08:54alostaleNote Added: 0088316
2016-07-08 08:54alostaleStatusresolved => closed
2016-07-08 08:54alostaleFixed in Version => 3.0PR16Q4
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0088985
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089000

Notes
(0086714)
johnfandl   
2016-05-24 18:36   
This is not minor from the customer perspective - appears as incorrect data and erodes confidence in the system.
(0088172)
hgbot   
2016-07-04 12:36   
Repository: erp/devel/pi
Changeset: f95207ec63c82ea1dcdb06a3ee8556d8a7d451c4
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Jun 29 18:10:10 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f95207ec63c82ea1dcdb06a3ee8556d8a7d451c4 [^]

Fixed issue 33003: The titles in the CSV were wrong

If there was a property field, the titles of those columns were wrong
when exporting to csv.
The problem was in the QueryJSONWriterToCSV inner class of the DataSourceServlet class.
Here wher exporting to csv there was only taking into account if the column of the field
was the same of the column checked in the iteration. The problem occurs when there are
two or more fields which have the same column.
Now the condition has been changed, first it checks if the current field is a property field
and if the property is the one we really want.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
---
(0088315)
hgbot   
2016-07-08 08:53   
Repository: erp/devel/pi
Changeset: 1b092d650f495d6111bcca837b0d39d93a3f5f03
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 08 08:52:33 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1b092d650f495d6111bcca837b0d39d93a3f5f03 [^]

related to bug 33003: small code style changes

   - Renamed formatedPropKey to formattedPropKey
   - formattedPropKey does not need to be initialized with "" if it is always
     assigned with the correct value

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
---
(0088316)
alostale   
2016-07-08 08:54   
tested

code reviewed: applied 2 small refactors
(0088985)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0089000)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test