Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027630 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2014-09-17 17:44 | 2014-09-22 09:14 | |||
Reporter | eduardo_Argal | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR14Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 6e24dd2e0fe8 | ||||
Projection | none | ETA | none | Target Version | 3.0PR14Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | shankarb | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027630: Wrong date format grids using Process Definition | |||||||
Description | Using HQL Datasources to build a grid inside a process definition window, add a field in the grid as DateTime. Having a field defined as DateTime, this one shows up in the grid as a Date. | |||||||
Steps To Reproduce | Use this branch: https://code.openbravo.com/erp/devel/pi-reconref [^] As F&B Admin: - Open the Financial Account window - Select a bank account - Create a Bank Statement Header. Enter any name. - Create a Bank Statement Line. Enter any reference No, and any amount in other than 0. - Process the Bank Statement - Press the Match Statement button - Press cancel when asked about executing algorithm - Right click on the grid headers to add the bslUpdated field. Its reference is DateTime. Realize that the content is a Date without time, this is wrong. | |||||||
Proposed Solution | Have a look at the attached diff which solves the problem. there are two if statements which are in wrong order. First wraps second so second is never used (Date wraps DateTime as DateTime is as well a Date). | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0070199) hgbot (developer) 2014-09-18 18:20 |
Repository: erp/devel/pi Changeset: 6e24dd2e0fe8f9d3192487681284b8bd590c3194 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Thu Sep 18 18:18:22 2014 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/6e24dd2e0fe8f9d3192487681284b8bd590c3194 [^] Fixes issue 27630: The proper date format is used in Pick and Execute windows When a datetime field was shown in a P&E window, the date format was used, instead of the datetime format. This happened because of this bug in the DataToJsonConverter.convertPrimitiveValue(): ... if (value instanceof Date) { return xmlDateFormat.format(value); } if (value instanceof Timestamp) { return xmlDateTimeFormat.format(value); } ... Timestamp is a subclass of Date, so all values that are instance of Timestamp are also instance of Date. This means that if the value attribute contains a datetime, the execution flow will enter in the first if statement, and the date format will be used. This bug is fixed by checking first by checking first if the value is an instance of Timestamp before checking if it is an instance of Date. This bug was not reproducible ins standard grids because this function is only called when using ReadOnlyDataSources. --- M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java --- |
(0070217) hudsonbot (viewer) 2014-09-19 20:23 |
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/af234b76a941 [^] Maturity status: Test |
(0070220) shankarb (viewer) 2014-09-22 09:14 |
Code reviewed and verified in pi changeset 99b060690c1f. |
![]() |
|||
Date Modified | Username | Field | Change |
2014-09-17 17:44 | eduardo_Argal | New Issue | |
2014-09-17 17:44 | eduardo_Argal | Assigned To | => AugustoMauch |
2014-09-17 17:44 | eduardo_Argal | OBNetwork customer | => No |
2014-09-17 17:44 | eduardo_Argal | Modules | => Core |
2014-09-17 17:44 | eduardo_Argal | Triggers an Emergency Pack | => No |
2014-09-17 17:44 | eduardo_Argal | File Added: DataToJsonConverter_Fix.diff | |
2014-09-18 18:02 | AugustoMauch | Steps to Reproduce Updated | View Revisions |
2014-09-18 18:19 | AugustoMauch | Issue Monitored: shankarb | |
2014-09-18 18:19 | AugustoMauch | Review Assigned To | => shankarb |
2014-09-18 18:20 | hgbot | Checkin | |
2014-09-18 18:20 | hgbot | Note Added: 0070199 | |
2014-09-18 18:20 | hgbot | Status | new => resolved |
2014-09-18 18:20 | hgbot | Resolution | open => fixed |
2014-09-18 18:20 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/6e24dd2e0fe8f9d3192487681284b8bd590c3194 [^] |
2014-09-19 20:23 | hudsonbot | Checkin | |
2014-09-19 20:23 | hudsonbot | Note Added: 0070217 | |
2014-09-22 09:14 | shankarb | Note Added: 0070220 | |
2014-09-22 09:14 | shankarb | Status | resolved => closed |
2014-09-22 09:14 | shankarb | Fixed in Version | => 3.0PR14Q4 |
Copyright © 2000 - 2009 MantisBT Group |