Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024783Openbravo ERPA. Platformpublic2013-09-16 17:442013-10-30 20:47
caristu 
shankarb 
highminoralways
closedfixed 
5
 
3.0MP293.0MP29 
AugustoMauch
Core
No
0024783: Time fields are not refreshed when setting their values trough an event handler
The fields that uses a time reference are not refreshed after setting their value using a business event handler (http://wiki.openbravo.com/wiki/How_to_implement_a_business_event_handler [^])
1) Create a new event handler for a window (entity) that has a field with a time reference, for example Work Effort. (Attached is an example for this window)

2) Implement the onSave method(), setting the value for the time field.

3) Notice that after executing the event handler, it is necessary to click on the refresh button to see the new value for the time field.
No tags attached.
related to defect 00244913.0MP28 closed AugustoMauch Date Time fields are not updated properly using callouts 
? TimeEventHandler.java (1,567) 2013-09-16 17:45
https://issues.openbravo.com/file_download.php?file_id=6413&type=bug
Issue History
2013-09-16 17:44caristuNew Issue
2013-09-16 17:44caristuAssigned To => AugustoMauch
2013-09-16 17:44caristuModules => Core
2013-09-16 17:44caristuResolution time => 1385766000
2013-09-16 17:44caristuTriggers an Emergency Pack => No
2013-09-16 17:44caristuIssue Monitored: networkb
2013-09-16 17:45caristuFile Added: TimeEventHandler.java
2013-09-16 17:55caristuRelationship addedrelated to 0024491
2013-10-30 08:15shankarbAssigned ToAugustoMauch => shankarb
2013-10-30 08:16shankarbReview Assigned To => AugustoMauch
2013-10-30 08:17shankarbIssue Monitored: AugustoMauch
2013-10-30 08:23hgbotCheckin
2013-10-30 08:23hgbotNote Added: 0061956
2013-10-30 08:23hgbotStatusnew => resolved
2013-10-30 08:23hgbotResolutionopen => fixed
2013-10-30 08:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/942524b9dfc07c617594c5640fce54faed410367 [^]
2013-10-30 09:25hgbotCheckin
2013-10-30 09:25hgbotNote Added: 0061958
2013-10-30 09:57AugustoMauchNote Added: 0061960
2013-10-30 09:57AugustoMauchStatusresolved => new
2013-10-30 09:57AugustoMauchResolutionfixed => open
2013-10-30 10:22hgbotCheckin
2013-10-30 10:22hgbotNote Added: 0061962
2013-10-30 10:22hgbotStatusnew => resolved
2013-10-30 10:22hgbotResolutionopen => fixed
2013-10-30 10:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/942524b9dfc07c617594c5640fce54faed410367 [^] => http://code.openbravo.com/erp/devel/pi/rev/74ad554804c2aaccce13cd65b39a7d8c40aae5d9 [^]
2013-10-30 10:26AugustoMauchNote Added: 0061965
2013-10-30 10:26AugustoMauchStatusresolved => closed
2013-10-30 10:26AugustoMauchFixed in Version => 3.0MP29
2013-10-30 20:47hudsonbotCheckin
2013-10-30 20:47hudsonbotNote Added: 0061984
2013-10-30 20:47hudsonbotCheckin
2013-10-30 20:47hudsonbotNote Added: 0061985
2013-10-30 20:47hudsonbotCheckin
2013-10-30 20:47hudsonbotNote Added: 0061987

Notes
(0061956)
hgbot   
2013-10-30 08:23   
Repository: erp/devel/pi
Changeset: 942524b9dfc07c617594c5640fce54faed410367
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Oct 30 12:50:08 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/942524b9dfc07c617594c5640fce54faed410367 [^]

Fixes Issue 0024783: Time fields are not refreshed on value change through an event handler

The time fields were not updated when updated through event handlers.
Used the formSaved event to check the fields current value and the data returned value and setting the new field value from data.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
(0061958)
hgbot   
2013-10-30 09:25   
Repository: erp/devel/pi
Changeset: 2eb60e1f2b727a6e1c0a6aec00714e5c1a3ecdd9
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Wed Oct 30 13:54:05 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2eb60e1f2b727a6e1c0a6aec00714e5c1a3ecdd9 [^]

Related to Issue 0024783 : Code formatting

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
(0061960)
AugustoMauch   
2013-10-30 09:57   
Reopened becaues it does not handle the following cases:
- When the event handler changes the time value from not null to null
- When the event handler changes the time value from null to not null
(0061962)
hgbot   
2013-10-30 10:22   
Repository: erp/devel/pi
Changeset: 74ad554804c2aaccce13cd65b39a7d8c40aae5d9
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Oct 30 14:50:14 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/74ad554804c2aaccce13cd65b39a7d8c40aae5d9 [^]

Fixes Issue 24783 : Time fields are not refreshed when setting their values trough an event handler

The response data value of the field is set to the field value if not equal.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
(0061965)
AugustoMauch   
2013-10-30 10:26   
Code reviewed and verified in pi@74ad554804c2
(0061984)
hudsonbot   
2013-10-30 20:47   
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/80f375c041fe [^]

Maturity status: Test
(0061985)
hudsonbot   
2013-10-30 20:47   
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/80f375c041fe [^]

Maturity status: Test
(0061987)
hudsonbot   
2013-10-30 20:47   
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/80f375c041fe [^]

Maturity status: Test