Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032600Openbravo ERPA. Platformpublic2016-04-05 13:072016-06-17 19:36
JONHM 
NaroaIriarte 
highmajoralways
closedfixed 
5
 
3.0PR16Q3 
alostale
Core
No
0032600: Wrong data in csv file exported on different timezone on the client side
Having the server in different time zone than the client creates data inconsistency at export csv file on the client side filtering by creation date range or some other date range.
*WATCH THE VIDEO ATTACHED BELOW*
(Server Side from 0:00 to 0:07 and Client side from 0:08 to 1:01)

1) Create some Sales Orders and change its creation data by SQL with different hours of the same day
2) Change to a different timezone on the Client side
3) Filter by date range (Creation Date for example)
4) Export CSV

-The result is a csv with different files than the grid view
No tags attached.
related to defect 0037079 closed caristu more records than expected are fetched when filtering by date ranges 
? wrong_csv.mp4 (2,971,074) 2016-04-05 13:09
https://issues.openbravo.com/file_download.php?file_id=9238&type=bug
Issue History
2016-04-05 13:07JONHMNew Issue
2016-04-05 13:07JONHMAssigned To => platform
2016-04-05 13:07JONHMModules => Core
2016-04-05 13:07JONHMResolution time => 1462312800
2016-04-05 13:07JONHMTriggers an Emergency Pack => No
2016-04-05 13:09JONHMFile Added: wrong_csv.mp4
2016-04-05 13:11JONHMDescription Updatedbug_revision_view_page.php?rev_id=11665#r11665
2016-04-05 13:11JONHMSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11667#r11667
2016-04-06 10:34alostaleStatusnew => scheduled
2016-04-06 10:34alostaleAssigned Toplatform => NaroaIriarte
2016-04-06 10:34alostaleTarget Version3.0PR16Q2 =>
2016-04-13 15:25hgbotCheckin
2016-04-13 15:25hgbotNote Added: 0085618
2016-04-13 15:25hgbotStatusscheduled => resolved
2016-04-13 15:25hgbotResolutionopen => fixed
2016-04-13 15:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e3137a29c326ac8a4c4b5c3a0a5ad68e9e43bd3a [^]
2016-04-13 15:26NaroaIriarteReview Assigned To => alostale
2016-04-13 15:26NaroaIriarteStatusresolved => scheduled
2016-04-13 15:26NaroaIriarteResolutionfixed => open
2016-04-13 15:26NaroaIriarteFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e3137a29c326ac8a4c4b5c3a0a5ad68e9e43bd3a [^] =>
2016-04-18 10:03NaroaIriarteStatusscheduled => resolved
2016-04-18 10:03NaroaIriarteFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e3137a29c326ac8a4c4b5c3a0a5ad68e9e43bd3a [^]
2016-04-18 10:03NaroaIriarteResolutionopen => fixed
2016-04-18 11:14alostaleNote Added: 0085693
2016-04-18 11:14alostaleStatusresolved => closed
2016-04-18 11:14alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087445
2017-11-28 11:02caristuRelationship addedrelated to 0037079

Notes
(0085618)
hgbot   
2016-04-13 15:25   
Repository: erp/devel/pi
Changeset: e3137a29c326ac8a4c4b5c3a0a5ad68e9e43bd3a
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Apr 13 11:24:18 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e3137a29c326ac8a4c4b5c3a0a5ad68e9e43bd3a [^]

Fixed issue 32600: Export csv was not working fine

The csv files where not correctly exported from the client if the client was in a different
timezone.
The problem was that in the AdvancedQueryBuilder class, the way of setting the date time was
not correct.
The Calendar.HOUR constant was being used instead of Calendar.HOUR_OF_DAY. The first, is to
set or get the hour indicating the morning or the afternoon, for example the 11:00:00 PM, the
hour is 11. The second one, the one that is used now, is used for the 24 hours clock, so, if
the time isn 11:00:00 the HOUR_OF_DAY is 23.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
(0085693)
alostale   
2016-04-18 11:14   
Code reviewed.

Tested, exported lines to csv now match the ones seen in grid in case local time zone property matches with actual client's time zone.
(0087445)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test