| Openbravo Issue Tracking System - Openbravo ERP | 
| View Issue Details | 
| 
 | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0031121 | Openbravo ERP | 05. Production management | public | 2015-10-09 12:27 | 2015-11-23 21:16 | 
| 
 | 
| Reporter | ngarcia |  | 
| Assigned To | vmromanos |  | 
| Priority | immediate | Severity | major | Reproducibility | always | 
| Status | closed | Resolution | fixed |  | 
| Platform |  | OS | 5 | OS Version |  | 
| Product Version |  |  | 
| Target Version |  | Fixed in Version |  |  | 
| Merge Request Status |  | 
| Review Assigned To | dmiguelez | 
| OBNetwork customer | OBPS | 
| Web browser |  | 
| Modules | Core | 
| Support ticket |  | 
| Regression level | Production - Confirmed Stable | 
| Regression date | 2014-04-24 | 
| Regression introduced in release | 3.0PR14Q3 | 
| Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/b856094303a9c6daff6db1d67e29563d273d512a [^] | 
| Triggers an Emergency Pack | No | 
| 
 | 
| Summary | 0031121: Copy Version process in Process Plan window is not working in Oracle | 
| Description | Copy Version process in Process Plan window is not working in Oracle | 
| Steps To Reproduce | 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)
 | 
| Proposed Solution |  | 
| Additional Information |  | 
| Tags | No tags attached. | 
| Relationships | | related to | design defect | 0028875 |  | acknowledged | Triage Platform Base | Class "CallStoredProcedure" does not support parameters of type out |  | depends on | backport | 0031167 | 3.0PR15Q4 | closed | Triage Omni OMS | Copy Version process in Process Plan window is not working in Oracle |  | depends on | backport | 0031168 | 3.0PR15Q3.2 | closed | Triage Omni OMS | Copy Version process in Process Plan window is not working in Oracle |  | depends on | backport | 0031169 | 3.0PR15Q2.6 | closed | Triage Omni OMS | Copy Version process in Process Plan window is not working in Oracle |  | caused by | defect | 0025403 | 3.0PR14Q3 | closed | AtulOpenbravo | Copy version process of Process Plan creates records with the organization you are logged in with | 
 | 
| Attached Files |  | 
| 
 | 
| Issue History | 
| Date Modified | Username | Field | Change | 
| 2015-10-09 12:27 | ngarcia | New Issue |  | 
| 2015-10-09 12:27 | ngarcia | Assigned To | => Triage Finance | 
| 2015-10-09 12:27 | ngarcia | OBNetwork customer | => Yes | 
| 2015-10-09 12:27 | ngarcia | Modules | => Core | 
| 2015-10-09 12:27 | ngarcia | Resolution time | => 1447887600 | 
| 2015-10-09 12:27 | ngarcia | Triggers an Emergency Pack | => No | 
| 2015-10-09 12:29 | ngarcia | Relationship added | related to 0025403 | 
| 2015-10-19 10:32 | egoitz | Resolution time | 1447887600 => 1445378400 | 
| 2015-10-19 10:32 | egoitz | Regression level | => Production - Confirmed Stable | 
| 2015-10-19 10:32 | egoitz | Regression introduced in release | => 3.0PR14Q3 | 
| 2015-10-19 10:32 | egoitz | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/b856094303a9c6daff6db1d67e29563d273d512a [^] | 
| 2015-10-19 10:32 | egoitz | Priority | urgent => immediate | 
| 2015-10-19 12:16 | vmromanos | Relationship deleted | related to 0025403 | 
| 2015-10-19 12:16 | vmromanos | Relationship added | caused by 0025403 | 
| 2015-10-19 12:16 | vmromanos | Relationship added | related to 0028875 | 
| 2015-10-19 12:18 | vmromanos | Regression date | => 2014-04-24 | 
| 2015-10-19 12:18 | vmromanos | Status | new => scheduled | 
| 2015-10-19 12:18 | vmromanos | Assigned To | Triage Finance => vmromanos | 
| 2015-10-19 12:44 | vmromanos | Note Added: 0081077 |  | 
| 2015-10-19 12:48 | vmromanos | Note Edited: 0081077 | bug_revision_view_page.php?bugnote_id=0081077#r9706 | 
| 2015-10-19 12:48 | vmromanos | Note Edited: 0081077 | bug_revision_view_page.php?bugnote_id=0081077#r9707 | 
| 2015-10-19 12:59 | vmromanos | Note Added: 0081079 |  | 
| 2015-10-19 18:55 | egoitz | Issue Monitored: networkb |  | 
| 2015-10-20 12:07 | hgbot | Checkin |  | 
| 2015-10-20 12:07 | hgbot | Note Added: 0081126 |  | 
| 2015-10-20 12:07 | hgbot | Status | scheduled => resolved | 
| 2015-10-20 12:07 | hgbot | Resolution | open => fixed | 
| 2015-10-20 12:07 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/1e0050968728c2448a903f6b9e0a1d0062241f53 [^] | 
| 2015-10-20 12:07 | dmiguelez | Review Assigned To | => dmiguelez | 
| 2015-10-20 12:07 | dmiguelez | Note Added: 0081127 |  | 
| 2015-10-20 12:07 | dmiguelez | Status | resolved => closed | 
| 2015-11-23 21:16 | hudsonbot | Checkin |  | 
| 2015-11-23 21:16 | hudsonbot | Note 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.
 
 
 |  | 
	| 
 | 
	|  |  | 
	| 
 | 
	| 
		
			| (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
 ---
 
 |  | 
	| 
 | 
	|  |  | 
	| 
 | 
	|  |  |