Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031121Openbravo ERP05. Production managementpublic2015-10-09 12:272015-11-23 21:16
ngarcia 
vmromanos 
immediatemajoralways
closedfixed 
5
 
 
dmiguelez
Core
Production - Confirmed Stable
2014-04-24
3.0PR14Q3
https://code.openbravo.com/erp/devel/pi/rev/b856094303a9c6daff6db1d67e29563d273d512a [^]
No
0031121: Copy Version process in Process Plan window is not working in Oracle
Copy Version process in Process Plan window is not working in Oracle
As group admin role:
   Create a Process Plan, Version, Operation...
   Click on the Copy Version and select the already created version
   Check no new version is created and the logs shows:
      ERROR org.openbravo.base.exception.OBException - java.sql.SQLSyntaxErrorException: ORA-00904: "AD_SEQUENCE_DOC": invalid identifier

java.lang.IllegalStateException: java.sql.SQLSyntaxErrorException: ORA-00904: "AD_SEQUENCE_DOC": invalid identifier

    at org.openbravo.service.db.CallStoredProcedure.call(CallStoredProcedure.java:142)
    at org.openbravo.common.actionhandler.CopyProcessPlanVersion.callAdSequenceDoc(CopyProcessPlanVersion.java:188)
No tags attached.
related to design defect 0028875 acknowledged Triage Platform Base Class "CallStoredProcedure" does not support parameters of type out 
depends on backport 00311673.0PR15Q4 closed Triage Omni OMS Copy Version process in Process Plan window is not working in Oracle 
depends on backport 00311683.0PR15Q3.2 closed Triage Omni OMS Copy Version process in Process Plan window is not working in Oracle 
depends on backport 00311693.0PR15Q2.6 closed Triage Omni OMS Copy Version process in Process Plan window is not working in Oracle 
caused by defect 00254033.0PR14Q3 closed AtulOpenbravo Copy version process of Process Plan creates records with the organization you are logged in with 
Issue History
2015-10-09 12:27ngarciaNew Issue
2015-10-09 12:27ngarciaAssigned To => Triage Finance
2015-10-09 12:27ngarciaModules => Core
2015-10-09 12:27ngarciaResolution time => 1447887600
2015-10-09 12:27ngarciaTriggers an Emergency Pack => No
2015-10-09 12:29ngarciaRelationship addedrelated to 0025403
2015-10-19 10:32egoitzResolution time1447887600 => 1445378400
2015-10-19 10:32egoitzRegression level => Production - Confirmed Stable
2015-10-19 10:32egoitzRegression introduced in release => 3.0PR14Q3
2015-10-19 10:32egoitzRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/b856094303a9c6daff6db1d67e29563d273d512a [^]
2015-10-19 10:32egoitzPriorityurgent => immediate
2015-10-19 12:16vmromanosRelationship deletedrelated to 0025403
2015-10-19 12:16vmromanosRelationship addedcaused by 0025403
2015-10-19 12:16vmromanosRelationship addedrelated to 0028875
2015-10-19 12:18vmromanosRegression date => 2014-04-24
2015-10-19 12:18vmromanosStatusnew => scheduled
2015-10-19 12:18vmromanosAssigned ToTriage Finance => vmromanos
2015-10-19 12:44vmromanosNote Added: 0081077
2015-10-19 12:48vmromanosNote Edited: 0081077bug_revision_view_page.php?bugnote_id=0081077#r9706
2015-10-19 12:48vmromanosNote Edited: 0081077bug_revision_view_page.php?bugnote_id=0081077#r9707
2015-10-19 12:59vmromanosNote Added: 0081079
2015-10-19 18:55egoitzIssue Monitored: networkb
2015-10-20 12:07hgbotCheckin
2015-10-20 12:07hgbotNote Added: 0081126
2015-10-20 12:07hgbotStatusscheduled => resolved
2015-10-20 12:07hgbotResolutionopen => fixed
2015-10-20 12:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1e0050968728c2448a903f6b9e0a1d0062241f53 [^]
2015-10-20 12:07dmiguelezReview Assigned To => dmiguelez
2015-10-20 12:07dmiguelezNote Added: 0081127
2015-10-20 12:07dmiguelezStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082135

Notes
(0081077)
vmromanos   
2015-10-19 12:44   
(edited on: 2015-10-19 12:48)
Important: run this test plan in both Oracle and PostgreSQL

Test plan:

In a Professional Instance, login as Openbravo Admin

Go to Activity window.
 Create a new record
 Search key = A, Name = A, Org = *

Go to Process Plan window
 Create a new record
 Search key = 1, Name = 1, Org = *
Go to Version tab
 Create a new record
 Start date = today, End date = 1 month later
Go to Operation tab
 Create a new record
 Search key = 1, Name = 1, Activity = A
 Save the record

Go to version tab
 Press Copy Version button
 Select the previous version
 Press OK
 Verify process is completed successfully.

(0081079)
vmromanos   
2015-10-19 12:59   
https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-9877 [^]
(0081126)
hgbot   
2015-10-20 12:07   
Repository: erp/devel/pi
Changeset: 1e0050968728c2448a903f6b9e0a1d0062241f53
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Oct 19 12:38:32 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1e0050968728c2448a903f6b9e0a1d0062241f53 [^]

Fixed bug 31121: Copy Version process in Process Plan window is not working in Oracle

Ad_Sequence_Doc is a stored procedure that returns the next sequence number using an "out" parameter. The CallStoredProcedure.call() used to call that procedure doesn't currently support parameters of type "out", creating an exception in Oracle only (and not in PostgreSQL because the procedure is declared as a function returning the value).

Instead of calling the procedure using CallStoredProcedure.call(), we use Utility.getDocumentNo() method instead, which is a more standard way to get the next sequence no. from Java, and supports Oracle procedures with "out" parameters.

Besides the class has been modified to properly show an error message in the UI in case an exception is raised, which is something not working before neither.

---
M src/org/openbravo/common/actionhandler/CopyProcessPlanVersion.java
---
(0081127)
dmiguelez   
2015-10-20 12:07   
Code Review + Testing Ok
(0082135)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test