Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040905Openbravo ERPA. Platformpublic2019-05-20 08:332019-08-22 14:45
Sandrahuguet 
AugustoMauch 
normalminorhave not tried
newopen 
30Openbravo Appliance 14.04
 
 
Core
No
0040905: It would be fine to automatically truncate the value if the reference is date
It would be fine to automatically truncate the value if the reference is date (not date/time).
N/A
No tags attached.
related to defect 0041476 closed alostale API Change: Columns that use the Date reference will only store date part (and not time part) in the database 
blocks defect 0040722 closed collazoandy4 MovementDate is filled with time and should contain only with the date 
diff transformDate.diff (4,721) 2019-07-19 14:35
https://issues.openbravo.com/file_download.php?file_id=13155&type=bug
Issue History
2019-05-20 08:33SandrahuguetNew Issue
2019-05-20 08:33SandrahuguetAssigned To => platform
2019-05-20 08:33SandrahuguetModules => Core
2019-05-20 08:33SandrahuguetTriggers an Emergency Pack => No
2019-05-20 08:34SandrahuguetRelationship addedblocks 0040722
2019-05-20 08:37SandrahuguetDescription Updatedbug_revision_view_page.php?rev_id=18789#r18789
2019-05-20 08:38SandrahuguetSummaryit would be fine to automatically truncate the value if the reference is date => It would be fine to automatically truncate the value if the reference is date
2019-05-20 08:38SandrahuguetDescription Updatedbug_revision_view_page.php?rev_id=18790#r18790
2019-07-19 14:35AugustoMauchFile Added: transformDate.diff
2019-07-29 16:36AugustoMauchAssigned Toplatform => AugustoMauch
2019-07-29 16:36AugustoMauchStatusnew => scheduled
2019-07-29 16:41hgbotCheckin
2019-07-29 16:41hgbotNote Added: 0113693
2019-07-29 16:41hgbotStatusscheduled => resolved
2019-07-29 16:41hgbotResolutionopen => fixed
2019-07-29 16:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6457d6616229b7c8cbabc82c4befc4891c98c6d1 [^]
2019-07-29 16:56AugustoMauchNote Added: 0113694
2019-07-29 17:03AugustoMauchRelationship addedrelated to 0041476
2019-07-29 17:13hgbotCheckin
2019-07-29 17:13hgbotNote Added: 0113695
2019-07-29 17:55hgbotCheckin
2019-07-29 17:55hgbotNote Added: 0113697
2019-07-29 18:01AugustoMauchStatusresolved => new
2019-07-29 18:01AugustoMauchResolutionfixed => open
2019-08-19 09:44AugustoMauchNote Added: 0114062
2019-08-19 09:44AugustoMauchTypefeature request => design defect
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114181
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114182
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114183

Notes
(0113693)
hgbot   
2019-07-29 16:41   
Repository: erp/devel/pi
Changeset: 6457d6616229b7c8cbabc82c4befc4891c98c6d1
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jul 29 16:40:42 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6457d6616229b7c8cbabc82c4befc4891c98c6d1 [^]

Fixes issue 40905: Values of Date properties are automatically truncated

Now before storing a date property in the database, the data is automatically truncated, its time
part is stripped.

This can be done because if a column uses the Date reference, its time part is not taken into account.
Stripping the time part allows to filter the date columns properly, otherwise the time part was
wrongfully taken into account.

There was not mechanism to transform a value at reference level, so a new hook has been added to
the DomainType class, with an empty default behaviour.

---
M src/org/openbravo/base/model/Property.java
M src/org/openbravo/base/model/domaintype/DateDomainType.java
M src/org/openbravo/base/model/domaintype/DomainType.java
M src/org/openbravo/base/structure/BaseOBObject.java
---
(0113694)
AugustoMauch   
2019-07-29 16:56   
Note that the current fix will not modify existing data.
(0113695)
hgbot   
2019-07-29 17:13   
Repository: erp/devel/pi
Changeset: 635b9156c59df2502ae7d03e6d5b50ccec0ea25f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jul 29 17:13:08 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/635b9156c59df2502ae7d03e6d5b50ccec0ea25f [^]

Related with issue 40905: Prevents NullPointerException when DomainType is null

---
M src/org/openbravo/base/model/Property.java
---
(0113697)
hgbot   
2019-07-29 17:55   
Repository: erp/devel/pi
Changeset: 85d17ee11787bfe60642075536729dea2ed2cd27
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jul 29 17:55:40 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/85d17ee11787bfe60642075536729dea2ed2cd27 [^]

Related with issue 40905: Rollback changes, they break CI

---
M src/org/openbravo/base/model/Property.java
M src/org/openbravo/base/model/domaintype/DateDomainType.java
M src/org/openbravo/base/model/domaintype/DomainType.java
M src/org/openbravo/base/structure/BaseOBObject.java
---
(0114062)
AugustoMauch   
2019-08-19 09:44   
Moved to design defect, as we have found no way to do it cleanly.

At first we tried truncating the date on the BaseOBObject.set method, but that was not a good point because that method is also invoked when Hibernate loads the data from database, and it is performining unintended changes
(0114181)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test
(0114182)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test
(0114183)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test