Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024491Openbravo ERPA. Platformpublic2013-08-06 14:372013-08-27 15:40
caristu 
AugustoMauch 
highminoralways
closedfixed 
5
 
3.0MP283.0MP27 
shankarb
Core
No
0024491: Date Time fields are not updated properly using callouts
Date Time fields are not being updated properly when setting their values from a callout.
1) Create a new column as follows: ALTER TABLE c_invopice ADD COLUMN em_moduledbprefix_datestart timestamp without time zone not null default now();
2) Register the new column in the application dictionary in [Tables and Columns] window. Choose the DateTime reference.
3) Create the field related to the new column.
4) Create a callout that changes that field value. Attached is a simple callout that can be used for testing. Register it in the [Callout] window and assing it to a field in the same tab of the one created in step 3.
5) Notice that the value of the field is not updated properly.
No tags attached.
related to defect 00247833.0MP29 closed shankarb Time fields are not refreshed when setting their values trough an event handler 
? MyCallout.java (680) 2013-08-06 14:54
https://issues.openbravo.com/file_download.php?file_id=6315&type=bug
Issue History
2013-08-06 14:37caristuNew Issue
2013-08-06 14:37caristuAssigned To => AugustoMauch
2013-08-06 14:37caristuModules => Core
2013-08-06 14:37caristuResolution time => 1382306400
2013-08-06 14:37caristuTriggers an Emergency Pack => No
2013-08-06 14:38caristuIssue Monitored: networkb
2013-08-06 14:39caristuFile Added: MyCallout.java
2013-08-06 14:39caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4936#r4936
2013-08-06 14:53caristuFile Deleted: MyCallout.java
2013-08-06 14:54caristuFile Added: MyCallout.java
2013-08-21 13:19AugustoMauchIssue Monitored: dbaz
2013-08-21 13:19AugustoMauchReview Assigned To => dbaz
2013-08-21 13:25hgbotCheckin
2013-08-21 13:25hgbotNote Added: 0060710
2013-08-21 13:25hgbotStatusnew => resolved
2013-08-21 13:25hgbotResolutionopen => fixed
2013-08-21 13:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f0180754bd11bc5b55cf79138439371614912b2d [^]
2013-08-22 18:17hudsonbotCheckin
2013-08-22 18:17hudsonbotNote Added: 0060732
2013-08-27 08:46AugustoMauchReview Assigned Todbaz => shankarb
2013-08-27 15:40shankarbNote Added: 0060792
2013-08-27 15:40shankarbStatusresolved => closed
2013-08-27 15:40shankarbFixed in Version => 3.0MP27
2013-09-16 17:55caristuRelationship addedrelated to 0024783

Notes
(0060710)
hgbot   
2013-08-21 13:25   
Repository: erp/devel/pi
Changeset: f0180754bd11bc5b55cf79138439371614912b2d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Aug 21 13:24:36 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f0180754bd11bc5b55cf79138439371614912b2d [^]

Fixes issue 24491: DateTime fields can be modified from callouts

The problem was the following:
- The current value of the datetime field is, i.e., 05-06-2013 10:00:00
- The callout tries to change it to another datetime, but not modifying the date part, i.e. 05-06-2013 11:45:00
- In order to check if the value of the field needed to be changed, the function isc.Date.compareLogicalDates(newValue, oldValue) was used. This function only
checks the date part of the value. In this case the date part is the same, so the change was not applied.

To fix this, datetime fields use isc.Date.compareDates (which compares both the date and the time parts) instead of isc.Date.compareLogicalDates.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-datetime.js
---
(0060732)
hudsonbot   
2013-08-22 18:17   
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/7535642cd9cf [^]

Maturity status: Test
(0060792)
shankarb   
2013-08-27 15:40   
Code reviewed and verified in pi changeset 327ce5aac264