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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021277
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. PlatformminorN/A2012-08-01 12:222012-08-29 19:26
ReportergorkaionView Statuspublic 
Assigned Tomarvintm 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision76bc4890f3db
ProjectionnoneETAnoneTarget Version3.0MP15
OSLinux 32 bitDatabaseOracleJava version1.5.0_15
OS VersionGentooDatabase version11gAnt version1.7.0
Product VersionpiSCM revision 
Review Assigned Tomigueldejuana
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021277: CallStoredProcedure do not support procedures that do not return a value

DescriptionCurrent call method of the CallStoredProcedure class assumes that always is used to call a function.

When trying to call a procedure using oracle the process fails.
Steps To ReproduceThere are 2 places in pi where this issue has been workarounded:

CostingAlgorithm.java line 524: Replace the CostingData.calculateWorkEffort by a call to CallStoredProcedure.

MRPManufacturingPlanProcess.java: Replace the private call method with a call to CallStoredProcedure.
Proposed SolutionThe CallProcess class already manages calls to procedures, but in this case it is assumed that these procedures have an ad_pinstance_id as unique parameter.

A new method should be created in the CallStoredProcedure that mixes current call implementation with the procedure calling of the CallProcess class.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 00212113.0MP15 closedgorkaion MRP performance should be improved. 
related to design defect 0036186 closedplatform MA_PRODUCTION_COST procedure can not be call from OB in oracle instance using CallStoredProcedure 

-  Notes
(0051448)
hgbot (developer)
2012-08-22 10:05

Repository: erp/devel/pi
Changeset: 39a08f4bf306aa67c18938df871350257de1f3c7
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Aug 22 10:05:16 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^]

Fixed issue 21277. Added call method to CallStoredProcedure which supports calling of procedures in Oracle.

---
M src/org/openbravo/costing/CostingAlgorithm.java
M src/org/openbravo/erpCommon/ad_actionButton/MRPManufacturingPlanProcess.java
M src/org/openbravo/service/db/CallStoredProcedure.java
---
(0051494)
mirurita (developer)
2012-08-23 10:06

If you call to this method with an empty List of parameters in PostgreSQL the preparedstatement is built as follows:

SELECT MA_PRODUCTION_COST AS RESULT FROM DUAL

and it fails because does not have parenthesis after the procedure. It tries to do a select from a table.

Caused by: java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: column "ma_production_cost" does not exist
(0051495)
hgbot (developer)
2012-08-23 10:09

Repository: erp/devel/pi
Changeset: 76bc4890f3db0c294d1086335b8e983aa17bd806
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Aug 23 10:09:14 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/76bc4890f3db0c294d1086335b8e983aa17bd806 [^]

Fixed issue 21277. Now the method will not produce broken sql if there are no parameteres.

---
M src/org/openbravo/service/db/CallStoredProcedure.java
---
(0051497)
hgbot (developer)
2012-08-23 10:47

Repository: erp/devel/pi
Changeset: f1c506df75cd74e6097818165d887d2318411c44
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Aug 23 10:46:07 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f1c506df75cd74e6097818165d887d2318411c44 [^]

Related to issue 21277: missing parameters on MA_PRODUCTION_COST

---
M src/org/openbravo/costing/CostingAlgorithm.java
---
(0051498)
mirurita (developer)
2012-08-23 10:55

Code review + functional testing done change on CostingAlgorithm java class.
(0051654)
migueldejuana (developer)
2012-08-29 19:26

Tested and reviewed in pi@19952d22eb0a

- Issue History
Date Modified Username Field Change
2012-08-01 12:22 gorkaion New Issue
2012-08-01 12:22 gorkaion Assigned To => networkb
2012-08-01 12:22 gorkaion Modules => Core
2012-08-01 12:22 gorkaion Relationship added related to 0021270
2012-08-01 12:24 gorkaion Assigned To networkb => marvintm
2012-08-06 08:55 gorkaion Relationship added related to 0021211
2012-08-06 08:56 gorkaion Relationship deleted related to 0021270
2012-08-22 10:05 hgbot Checkin
2012-08-22 10:05 hgbot Note Added: 0051448
2012-08-22 10:05 hgbot Status new => resolved
2012-08-22 10:05 hgbot Resolution open => fixed
2012-08-22 10:05 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^]
2012-08-23 10:06 mirurita Note Added: 0051494
2012-08-23 10:06 mirurita Status resolved => new
2012-08-23 10:06 mirurita Resolution fixed => open
2012-08-23 10:09 hgbot Checkin
2012-08-23 10:09 hgbot Note Added: 0051495
2012-08-23 10:09 hgbot Status new => resolved
2012-08-23 10:09 hgbot Resolution open => fixed
2012-08-23 10:09 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^] => http://code.openbravo.com/erp/devel/pi/rev/76bc4890f3db0c294d1086335b8e983aa17bd806 [^]
2012-08-23 10:47 hgbot Checkin
2012-08-23 10:47 hgbot Note Added: 0051497
2012-08-23 10:55 mirurita Note Added: 0051498
2012-08-29 19:26 migueldejuana Closed by => migueldejuana
2012-08-29 19:26 migueldejuana Note Added: 0051654
2012-08-29 19:26 migueldejuana Status resolved => closed
2017-06-13 18:34 aferraz Relationship added related to 0036186


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker