Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012901
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2010-04-07 14:272010-04-19 21:13
ReportershuehnerView Statuspublic 
Assigned Tomtaal 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision253f727de17e
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012901: OBDal.getInstance().getConnection() does not setup dateFormat correctly

DescriptionThis function (compared) to the ones in DalConnectionProvider or ConnectionProviderImpl is missing the dateFormat setup code based on Openbravo.properties which means handling of dates (in the dbms) is different from the rest of the application when using this connection.

Indirectly found in the testcase for issue 12106 as using CalledStoredProcedure for ad_column_identifier involving a date returned a different output from the expected one.
Steps To Reproducerun IssuesTest.test12106 on oracle and notice it failing
Proposed SolutionMove dateFormat setup code from DalConnectionProvider to obdal.getconnection() as the latter one is already used by the former.

Ideally: test direct and indirect callers (modules) For regressions regarding date handling (i.e. CallProcess,CallStoredProcedure)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0012106 closedmtaal record identifier returned from dal uses ' ' as separator of columns, but normal pl-version uses ' - ' 

-  Notes
(0025941)
shuehner (administrator)
2010-04-07 14:30

A testcase calling ad_column_identifier via xsql (or using a BaseTest.getConnectionProvider connection) and one calling it via dal for c_invoice would be fine to assure the same date-formatting in the future. This could perhaps be added to the test12106 as a third comparison.
(0025942)
shuehner (administrator)
2010-04-07 14:33

Note: after fixing this issue the test12106 testcase should have its assert enabled, and should succeed.
(0025963)
mtaal (manager)
2010-04-07 23:08

Yes agree that adding an xsql would be nice. If you can provide a valid xsql then I am interested to try it out, for the rest I am fine with the current test.

gr. Martin
(0025964)
mtaal (manager)
2010-04-07 23:08

Will commit a change in a few minutes, all testcases pass with this change.

gr. Martin
(0025967)
hgbot (developer)
2010-04-08 09:35

Repository: erp/devel/pi
Changeset: 8e0cb4346d509574818d830340d424d74c74cfd0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Apr 08 09:47:11 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8e0cb4346d509574818d830340d424d74c74cfd0 [^]

fixes issue 12901: OBDal.getInstance().getConnection() does not setup dateFormat correctly

---
M src/org/openbravo/dal/service/OBDal.java
M src/org/openbravo/service/db/DalConnectionProvider.java
---
(0025971)
mtaal (manager)
2010-04-08 11:47

After some more discussion it seems better to move the date formatting sql call one level deeper to where the session is created.
(0026049)
hgbot (developer)
2010-04-09 21:00

Repository: erp/devel/pi
Changeset: 253f727de17ee37af873599fdb757d468228081a
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Apr 09 21:12:35 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/253f727de17ee37af873599fdb757d468228081a [^]

fixes issue 12901: OBDal.getInstance().getConnection() does not setup dateFormat correctly

---
M src/org/openbravo/dal/core/DalSessionFactory.java
M src/org/openbravo/dal/service/OBDal.java
---
(0026079)
shuehner (administrator)
2010-04-12 18:44

Tested in pi on pgsql+oracle via executing IssuesTest.test12106 junit-testcase to verify that now the dateFormat setup is identical for xsql-connections and dal-connections.

Note: This issue now setups the dateFormat properly for all connections in openbravo which was not done before completely for the dal part.

This only affects sql-code when run from a dal-context, like i.e. sql-functions in a hql-query (not a normal use-case), the use of CallProcess and CallStoredProcedure. For the first no existing user is known for the last two all published modules where search for its use and exemplary the MassInvoicing was checked in this regards: no issues were found.

So far the only notice of this defect at all was a failing test-case.

General risk estimation from platform-team: low to none
(0026434)
hudsonbot (developer)
2010-04-19 21:12

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/8e0cb4346d50 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]
(0026449)
hudsonbot (developer)
2010-04-19 21:13

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/253f727de17e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]

- Issue History
Date Modified Username Field Change
2010-04-07 14:27 shuehner New Issue
2010-04-07 14:27 shuehner Assigned To => mtaal
2010-04-07 14:27 shuehner Relationship added related to 0012106
2010-04-07 14:30 shuehner Note Added: 0025941
2010-04-07 14:33 shuehner Note Added: 0025942
2010-04-07 23:08 mtaal Note Added: 0025963
2010-04-07 23:08 mtaal Note Added: 0025964
2010-04-08 09:35 hgbot Checkin
2010-04-08 09:35 hgbot Note Added: 0025967
2010-04-08 09:35 hgbot Status new => resolved
2010-04-08 09:35 hgbot Resolution open => fixed
2010-04-08 09:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8e0cb4346d509574818d830340d424d74c74cfd0 [^]
2010-04-08 11:47 mtaal Note Added: 0025971
2010-04-08 11:47 mtaal Status resolved => new
2010-04-08 11:47 mtaal Resolution fixed => open
2010-04-09 20:28 shuehner Status new => scheduled
2010-04-09 20:28 shuehner fix_in_branch => pi
2010-04-09 21:00 hgbot Checkin
2010-04-09 21:00 hgbot Note Added: 0026049
2010-04-09 21:00 hgbot Status scheduled => resolved
2010-04-09 21:00 hgbot Resolution open => fixed
2010-04-09 21:00 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/8e0cb4346d509574818d830340d424d74c74cfd0 [^] => http://code.openbravo.com/erp/devel/pi/rev/253f727de17ee37af873599fdb757d468228081a [^]
2010-04-12 18:44 shuehner Note Added: 0026079
2010-04-12 18:44 shuehner Status resolved => closed
2010-04-13 00:00 anonymous sf_bug_id 0 => 2986154
2010-04-19 21:12 hudsonbot Checkin
2010-04-19 21:12 hudsonbot Note Added: 0026434
2010-04-19 21:13 hudsonbot Checkin
2010-04-19 21:13 hudsonbot Note Added: 0026449


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker