Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020496Openbravo ERPA. Platformpublic2012-05-14 16:582012-06-12 17:00
egoitz 
migueldejuana 
urgentmajoralways
closedfixed 
5
3.0MP10.2 
3.0MP133.0MP13 
Core
No
0020496: The date on the process monitor window changes when moving from form to grid depending on the timezone
The date on the process monitor window changes when moving from form to grid depending on the timezone.

When accessing to an application on from a client on USA the time on grid is one day bigger than the date on the form.

Attached two images.
-From a computer on a Usa access to demo.openbravo.com
-Go to process monitor
-Select a row with a data for example 14-05-2012 09:30:00
-Open on form view. The data changes to 14-05-2012 19:00:00
No tags attached.
has duplicate defect 00204973.0MP12 closed alostale The date on the process monitor window changes when moving from form to grid depending on the timezone. 
related to defect 0020543 closed alostale Saving failed. java.text.ParseException: Unparseable date - when using a US date formatting 
related to design defect 0020563 closed alostale In Process Request window, Start Date doesn't change depending on our timezone 
related to defect 0020684 closed AugustoMauch Incorrect time in process request with different timezones in client/server 
? issue20496.commit (4,284) 2012-05-29 09:45
https://issues.openbravo.com/file_download.php?file_id=5265&type=bug
Issue History
2012-05-14 16:58egoitzNew Issue
2012-05-14 16:58egoitzAssigned To => alostale
2012-05-14 16:58egoitzModules => Core
2012-05-14 16:58egoitzResolution time => 1339711200
2012-05-15 09:13alostaleRelationship addedhas duplicate 0020497
2012-05-15 16:09alostaleAssigned Toalostale => migueldejuana
2012-05-17 16:53migueldejuanaNote Added: 0048741
2012-05-17 18:01migueldejuanaNote Added: 0048742
2012-05-17 18:08hgbotCheckin
2012-05-17 18:08hgbotNote Added: 0048743
2012-05-17 18:08hgbotStatusnew => resolved
2012-05-17 18:08hgbotResolutionopen => fixed
2012-05-17 18:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f63f8665c1affa8e5594b0018508f73e2db86204 [^]
2012-05-18 07:57alostaleRelationship addedrelated to 0020543
2012-05-18 14:24hgbotCheckin
2012-05-18 14:24hgbotNote Added: 0048767
2012-05-18 14:26migueldejuanaStatusresolved => new
2012-05-18 14:26migueldejuanaResolutionfixed => open
2012-05-21 17:25migueldejuanaRelationship addedrelated to 0020563
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049158
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049163
2012-05-29 09:45migueldejuanaFile Added: issue20496.commit
2012-05-29 09:54migueldejuanaNote Added: 0049404
2012-05-29 11:54jonalegriaesarteTarget Version3.0MP12 => 3.0MP13
2012-06-06 09:41alostaleRelationship addedrelated to 0020684
2012-06-12 16:57hgbotCheckin
2012-06-12 16:57hgbotNote Added: 0049775
2012-06-12 16:57hgbotStatusnew => resolved
2012-06-12 16:57hgbotResolutionopen => fixed
2012-06-12 16:57hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f63f8665c1affa8e5594b0018508f73e2db86204 [^] => http://code.openbravo.com/erp/devel/pi/rev/0b5e6502cd763b19322b45532b771ae678dd40f2 [^]
2012-06-12 17:00AugustoMauchNote Added: 0049776
2012-06-12 17:00AugustoMauchStatusresolved => closed
2012-06-12 17:00AugustoMauchFixed in Version => 3.0MP13

Notes
(0048741)
migueldejuana   
2012-05-17 16:53   
Opening form view, the startTime and endTime is changed to our timezone (in the grid it is already done).
The problem is in the processColumnValue method of the ob-view-form.js. The Date elements are processed AGAIN to be changed to our timezone and it causes an error when our timezone is a negative timezone(UTC-1 ,UTC-2...).
References "Date" and "DateTime" don't need to be processed in processColumnValue but "Time" reference has not been processed yet and it have to be changed to our timezone in processColumnValue.
(0048742)
migueldejuana   
2012-05-17 18:01   
Risky fix.

Test plan:
It is enough if we change our computer timezone to prove it.
Prove it with different timezones (i.e:USA, Spain and India):

-Go to process monitor
-Select a row with a data for example 14-05-2012 09:30:00
-Open on form view. The data changes to 14-05-2012 19:00:00

There could be more cases not covered.
(0048743)
hgbot   
2012-05-17 18:08   
Repository: erp/devel/pi
Changeset: f63f8665c1affa8e5594b0018508f73e2db86204
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu May 17 18:06:47 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f63f8665c1affa8e5594b0018508f73e2db86204 [^]

Fixed issue 20496: ProcessMonitor-FormView, negative Timezone print well DateTime
In Process Monitor window, opening form view, the startTime and endTime is changed to our timezone (in the grid it is already done).
The problem is in the processColumnValue method of the ob-view-form.js. The Date elements are processed AGAIN to be changed to our timezone and it causes an error when our timezone is a negative timezone(UTC-1 ,UTC-2...).
References "Date" and "DateTime" don't need to be processed in processColumnValue but "Time" reference has not been processed yet and it have to be changed to our timezone in processColumnValue.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0048767)
hgbot   
2012-05-18 14:24   
Repository: erp/devel/pi
Changeset: 6a99934dbfc9271c7b1eb4ce4935dd58614a3269
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri May 18 14:23:27 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6a99934dbfc9271c7b1eb4ce4935dd58614a3269 [^]

Related to issue 20496: Backout error dateTime ProcessMonitor and code format

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0049158)
hudsonbot   
2012-05-25 12:12   
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/5401e185a8b0 [^]

Maturity status: Test
(0049163)
hudsonbot   
2012-05-25 12:12   
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/5401e185a8b0 [^]

Maturity status: Test
(0049404)
migueldejuana   
2012-05-29 09:54   
It has been attached 'issue20496.commit' with the fix to this issue. It has not been pushed because it need to be tested.

Cases to test(following steps to reproduce):

- Server in negative timezone(San Francisco) and client in Madrid.
- Server in positive timezone(Tokyo) and client in Madrid.
- Test with differents date formats.
- If there are more DateTime in other windows, test their behaviour.
(0049775)
hgbot   
2012-06-12 16:57   
Repository: erp/devel/pi
Changeset: 0b5e6502cd763b19322b45532b771ae678dd40f2
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed May 23 10:55:08 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0b5e6502cd763b19322b45532b771ae678dd40f2 [^]

Fixed issue 20496: Process Monitor in Form view, startTime for all timezones
In Process Monitor window, When we open Form view, the StartTime field was wrong in some timezones. Now it works well.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0049776)
AugustoMauch   
2012-06-12 17:00   
Code reviewed and verified in pi@0b5e6502cd76