Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018561Openbravo ERP01. General setuppublic2011-09-20 08:062012-01-20 13:11
roklenardic 
alostale 
urgentmajoralways
closedfixed 
5
3.0MP4.1 
3.0MP7 
Google Chrome
Core
No
0018561: Time reference showed incorrectly in Process Request window
When entering Start Time in Process Request window, the saved value is not displayed correctly.
1) Go to General Setup || Process Scheduling || Process Request screen and enter a new record for any of the background processes
2) select Timing = Schedule
3) Enter 12:30 into Start Time
4) Save
5) refresh the record and the Start Time changes to 11:30

PS: try entering 6:05 into Start time and refreshing, it changes to 0:00.
No tags attached.
related to defect 00184843.0MP5 closed mtaal Fields Updated and Created do not have the hour 
related to defect 0016014 closed mtaal Date fields on edit mode decrease by one day 
has duplicate defect 0018257 closed marvintm Process request shows different start time in grid and form view 
related to defect 00193663.0MP8 closed alostale Refreshing Work Effort Header window changes values in the Starting Time & Ending Time columns/fields. 
related to defect 0020684 closed AugustoMauch Incorrect time in process request with different timezones in client/server 
tgz time.tgz (625) 2011-11-24 11:28
https://issues.openbravo.com/file_download.php?file_id=4781&type=bug
? issue-18561.export (6,190) 2011-11-24 11:49
https://issues.openbravo.com/file_download.php?file_id=4782&type=bug
Issue History
2011-09-20 08:06roklenardicNew Issue
2011-09-20 08:06roklenardicAssigned To => jonalegriaesarte
2011-09-20 08:06roklenardicWeb browser => Google Chrome
2011-09-20 08:06roklenardicModules => Core
2011-10-31 16:51VictorVillarWeb browserGoogle Chrome => Google Chrome
2011-10-31 16:51VictorVillarResolution time => 1323039600
2011-10-31 16:51VictorVillarPrioritynormal => urgent
2011-10-31 16:51VictorVillarSeverityminor => major
2011-10-31 16:51VictorVillarversionpi => 3.0MP4.1
2011-10-31 16:51VictorVillarTarget Version => 3.0MP6
2011-11-15 15:10jonalegriaesarteAssigned Tojonalegriaesarte => alostale
2011-11-15 16:56alostaleRelationship addedrelated to 0018484
2011-11-24 11:28alostaleFile Added: time.tgz
2011-11-24 11:42alostaleNote Added: 0043147
2011-11-24 11:42alostaleWeb browserGoogle Chrome => Google Chrome
2011-11-24 11:42alostaleTarget Version3.0MP6 => 3.0MP7
2011-11-24 11:49alostaleFile Added: issue-18561.export
2011-11-24 11:51alostaleNote Added: 0043148
2011-11-24 11:53alostaleNote Added: 0043149
2011-12-12 08:31hgbotCheckin
2011-12-12 08:31hgbotNote Added: 0043769
2011-12-12 08:31hgbotStatusnew => resolved
2011-12-12 08:31hgbotResolutionopen => fixed
2011-12-12 08:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/54a304b3a7ab26c18b4eef13cf657f99668e5bc6 [^]
2011-12-12 11:19mtaalNote Added: 0043786
2011-12-12 11:19mtaalStatusresolved => new
2011-12-12 11:19mtaalResolutionfixed => open
2011-12-12 11:34hgbotCheckin
2011-12-12 11:34hgbotNote Added: 0043790
2011-12-12 11:34hgbotStatusnew => resolved
2011-12-12 11:34hgbotResolutionopen => fixed
2011-12-12 11:34hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/54a304b3a7ab26c18b4eef13cf657f99668e5bc6 [^] => http://code.openbravo.com/erp/devel/pi/rev/45ff7d718f068d025dc75b25b3807de2f03a4376 [^]
2011-12-12 11:50mtaalAssigned Toalostale => mtaal
2011-12-12 11:50mtaalNote Added: 0043791
2011-12-12 11:50mtaalStatusresolved => new
2011-12-12 11:50mtaalResolutionfixed => open
2011-12-12 11:50mtaalRelationship addedrelated to 0016014
2011-12-12 11:50mtaalNote Added: 0043792
2011-12-12 11:53hgbotCheckin
2011-12-12 11:53hgbotNote Added: 0043793
2011-12-12 11:53hgbotStatusnew => resolved
2011-12-12 11:53hgbotResolutionopen => fixed
2011-12-12 11:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/45ff7d718f068d025dc75b25b3807de2f03a4376 [^] => http://code.openbravo.com/erp/devel/pi/rev/bd7c690a637aabb8469e33a356d7fb74177aa33d [^]
2011-12-12 12:02hgbotCheckin
2011-12-12 12:02hgbotNote Added: 0043795
2011-12-12 16:31marvintmAssigned Tomtaal => alostale
2011-12-12 16:31marvintmNote Added: 0043804
2011-12-12 16:31marvintmStatusresolved => new
2011-12-12 16:31marvintmResolutionfixed => open
2011-12-12 16:36mtaalAssigned Toalostale => mtaal
2011-12-12 16:38mtaalAssigned Tomtaal => alostale
2011-12-13 10:32hgbotCheckin
2011-12-13 10:32hgbotNote Added: 0043813
2011-12-13 10:32hgbotStatusnew => resolved
2011-12-13 10:32hgbotResolutionopen => fixed
2011-12-13 10:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/bd7c690a637aabb8469e33a356d7fb74177aa33d [^] => http://code.openbravo.com/erp/devel/pi/rev/067d0992e67d8907efbcb7c2e1ae24a2dd52c3cd [^]
2011-12-13 16:43hudsonbotCheckin
2011-12-13 16:43hudsonbotNote Added: 0043836
2011-12-13 16:43hudsonbotCheckin
2011-12-13 16:43hudsonbotNote Added: 0043843
2011-12-13 16:44hudsonbotCheckin
2011-12-13 16:44hudsonbotNote Added: 0043844
2011-12-13 16:44hudsonbotCheckin
2011-12-13 16:44hudsonbotNote Added: 0043845
2011-12-14 10:44hudsonbotCheckin
2011-12-14 10:44hudsonbotNote Added: 0043864
2011-12-14 12:51marvintmNote Added: 0043874
2011-12-14 12:51marvintmStatusresolved => closed
2012-01-20 12:38alostaleRelationship addedrelated to 0019366
2012-01-20 13:10RenateNieuwkoopNote Added: 0044469
2012-01-20 13:11RenateNieuwkoopIssue Monitored: RenateNieuwkoop
2012-01-27 11:12marvintmRelationship addedhas duplicate 0018257
2012-06-06 10:23alostaleRelationship addedrelated to 0020684

Notes
(0043147)
alostale   
2011-11-24 11:42   
This seems to be an issue with SmartClient and how it sends time to backend.

From SmartClient documentation:
"time field values in requests will be serialized out as full times in UTC using the standard XML Schema date / time format - HH:MM:SS" (http://www.smartclient.com/docs/8.0/a/b/c/go.html#group..dateFormatAndStorage [^])

The problem seems to be time zone is not taken into account, so regardless client's timezone, the time entered in the field is sent to backend. Backened is assuming UTC in case no timezone offset is sent, so it takes it as UTC time.

In case DataSource.serializeTimeAsDatetime class property is set to true (which is false by default), complete date in UTC time is sent to backend, making all stuff to work. The problem this is a DataSource class property, which might affect to any Datasource instances.
(0043148)
alostale   
2011-11-24 11:51   
Changed target release to mp7, as the changeset needs to be reviewed, because it might create some regressions as it is changing global DataSource behavior.

Attached proposed patch though.
(0043149)
alostale   
2011-11-24 11:53   
Test plan:
-In Process Request edit start time
-Save
-Refresh
-Check time is not changed

Test with different times, i.e: 10:10, 1:05, 13:14...

Regression check:
This changeset is setting a global DataSource setting which makes to change the way times are sent to backend. Check possible collaterals for this change.
(0043769)
hgbot   
2011-12-12 08:31   
Repository: erp/devel/pi
Changeset: 54a304b3a7ab26c18b4eef13cf657f99668e5bc6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 24 11:47:05 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/54a304b3a7ab26c18b4eef13cf657f99668e5bc6 [^]

fixed bug 18561: Time reference showed incorrectly in Process Request window

Setting isc.DataSource.serializeTimeAsDatetime=true so time references are sent as complete
UTC date time rather than just truncating timezone information.

Formatting it properly in the FIC response.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
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/TimeUIDefinition.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0043786)
mtaal   
2011-12-12 11:19   
2 issues:
- in grid editing the error still occurs, when the time is 06:00 then in grid editing the edit field shows: 07:00, note that the displayformatting is caused by another issue (19114)
- there is a javascript error in the pushed code:
     for (i = 0; i < toolBarButtons.leftMembers.length; i++) {
        if (toolBarButtons.leftMembers[i].updateState) {
          toolBarButtons.leftMembers[i].updateState();
        }
      }
 
should be changed to:
      for (i = 0; i < toolBarButtons.length; i++) {
        if (toolBarButtons[i].updateState) {
          toolBarButtons[i].updateState();
        }
      }
(0043790)
hgbot   
2011-12-12 11:34   
Repository: erp/devel/pi
Changeset: 45ff7d718f068d025dc75b25b3807de2f03a4376
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Dec 12 11:33:03 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/45ff7d718f068d025dc75b25b3807de2f03a4376 [^]

fixed bug 18561: Fixed js error

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
(0043791)
mtaal   
2011-12-12 11:50   
To solve issue with moving time
(0043792)
mtaal   
2011-12-12 11:50   
Also 16014 needs to be retested when closing this issue
(0043793)
hgbot   
2011-12-12 11:53   
Repository: erp/devel/pi
Changeset: bd7c690a637aabb8469e33a356d7fb74177aa33d
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Dec 12 11:52:38 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bd7c690a637aabb8469e33a356d7fb74177aa33d [^]

Fixes issue 18561: Time reference showed incorrectly in Process Request window

---
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0043795)
hgbot   
2011-12-12 12:02   
Repository: erp/devel/pi
Changeset: c4639a1013b7274f6bd697d6a7d6e31d108d90b5
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Dec 12 12:02:23 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c4639a1013b7274f6bd697d6a7d6e31d108d90b5 [^]

Related to issue 18561: Time reference showed incorrectly in Process Request window
Also show seconds in edit mode

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
(0043804)
marvintm   
2011-12-12 16:31   
The fix doesn't work in case the server and the client are in different timezones
(0043813)
hgbot   
2011-12-13 10:32   
Repository: erp/devel/pi
Changeset: 067d0992e67d8907efbcb7c2e1ae24a2dd52c3cd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 13 10:31:10 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/067d0992e67d8907efbcb7c2e1ae24a2dd52c3cd [^]

fixed bug 18561: Time reference showed incorrectly in Process Request window

  Now when server and client are in different time zones, hour is correctly kept:
    -Backed out changeset bd7c690a637aabb8469e33a356d7fb74177aa33d
    -Take into account time zone in OBTimeItem if it is sent in the string

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0043836)
hudsonbot   
2011-12-13 16:43   
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/8a06361cc265 [^]

Maturity status: Test
(0043843)
hudsonbot   
2011-12-13 16:43   
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/8a06361cc265 [^]

Maturity status: Test
(0043844)
hudsonbot   
2011-12-13 16:44   
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/8a06361cc265 [^]

Maturity status: Test
(0043845)
hudsonbot   
2011-12-13 16:44   
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/8a06361cc265 [^]

Maturity status: Test
(0043864)
hudsonbot   
2011-12-14 10:44   
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/8dbb94fbbb00 [^]

Maturity status: Test
(0043874)
marvintm   
2011-12-14 12:51   
Now it works even when the client and server are in different timezones
(0044469)
RenateNieuwkoop   
2012-01-20 13:10   
Please make sure to test the scenarios that are described in issue 19366 also