Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013356Openbravo ERPA. Platformpublic2010-05-18 09:522010-05-20 11:15
networkb 
adrianromero 
immediatemajoralways
closedfixed 
5
2.50MP17 
2.50MP182.50MP18 
Core
No
0013356: Error when updating from 2.50mp14 to 2.50mp17.
Error when updating from 2.50mp14 to 2.50mp17 if you have defined a new documenttype for the good shipments or receipts ( docbasetype 'MMR' or'MMS')
using a name with lengh bigger than 44.

This is because the CreateDoctypeTemplate modulescripts tries to insert on the table c_poc_doctype_template a new entrie but using as name the name of the document + " Report Template" so this new string excedes the maximum lenght
of the column name on the c_poc_doctype_template table.
-On 2.50mp14 release define a new document with docbasetype 'MMR' or'MMS' using a name with lengh bigger than 44.

-Upate the application to 2.50mp17

-You get the following error:

[java] 222633 INFO - Executing moduleScript: org.openbravo.modulescript.CreateDoctypeTemplate
[java] 222959 ERROR - SQL error in query: INSERT INTO c_poc_doctype_template( c_poc_doctype_template_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, c_doctype_id, name, templatelocation, reportfilename, templatefilename) VALUES (?, ?, '0', 'Y', now(), '0', now(), '0', ?, ?, ?, ?, ?)Exception:org.postgresql.util.PSQLException: ERROR: value too long for type character varying(60)
[java] 222962 ERROR - Error executing moduleScript org.openbravo.modulescript.CreateDoctypeTemplate: @CODE=0@ERROR: value too long for type character varying(60)
[java] 222964 ERROR - Error executing moduleScript: org.openbravo.modulescript.CreateDoctypeTemplate
[java] Execution of moduleScript org.openbravo.modulescript.CreateDoctypeTemplatefailed.
[java] at org.openbravo.modulescript.ModuleScriptHandler.execute(ModuleScriptHandler.java:68)
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:164)
[java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:87)
[java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:34)
[java] Exception in thread "main" Execution of moduleScript org.openbravo.modulescript.CreateDoctypeTemplatefailed.
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:202)
[java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:87)
[java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:34)
[java] Caused by: Execution of moduleScript org.openbravo.modulescript.CreateDoctypeTemplatefailed.
[java] at org.openbravo.modulescript.ModuleScriptHandler.execute(ModuleScriptHandler.java:68)
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:164)
[java] ... 2 more
[java] --- Nested Exception ---
[java] Execution of moduleScript org.openbravo.modulescript.CreateDoctypeTemplatefailed.
[java] at org.openbravo.modulescript.ModuleScriptHandler.execute(ModuleScriptHandler.java:68)
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:164)
[java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:87)
[java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:34)
Regression
related to defect 00119962.50MP14 closed adrianromero The jasper report linked to MM Shipment/Receipt is not printed 
Issue History
2010-05-18 09:52networkbNew Issue
2010-05-18 09:52networkbAssigned To => alostale
2010-05-18 09:53networkbTarget Version => 2.50MP18
2010-05-18 10:56alostaleStatusnew => scheduled
2010-05-18 10:56alostaleAssigned Toalostale => adrianromero
2010-05-18 10:56alostalefix_in_branch => pi
2010-05-18 11:03psarobeTag Attached: Regression
2010-05-18 11:04psarobeversion2.50MP14 => 2.50MP17
2010-05-18 11:04psarobefix_in_branchpi =>
2010-05-18 12:25adrianromeroRelationship addedrelated to 0011996
2010-05-18 13:08hgbotCheckin
2010-05-18 13:08hgbotNote Added: 0027416
2010-05-18 13:08hgbotStatusscheduled => resolved
2010-05-18 13:08hgbotResolutionopen => fixed
2010-05-18 13:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7203ab098ac5957a682e284557c2996530ae8c70 [^]
2010-05-18 13:10harikrishnanNote Added: 0027417
2010-05-18 14:56psarobeNote Added: 0027431
2010-05-18 14:56psarobeStatusresolved => closed
2010-05-18 14:56psarobeFixed in Version => 2.50MP18
2010-05-19 00:01anonymoussf_bug_id0 => 3003691
2010-05-20 11:15hudsonbotCheckin
2010-05-20 11:15hudsonbotNote Added: 0027592

Notes
(0027416)
hgbot   
2010-05-18 13:08   
Repository: erp/devel/pi
Changeset: 7203ab098ac5957a682e284557c2996530ae8c70
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Tue May 18 16:37:46 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7203ab098ac5957a682e284557c2996530ae8c70 [^]

Fixes Issue 13356 Before, a string is appended along with the name.Now this is removed.

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/CreateDoctypeTemplate.class
M src-util/modulescript/src/org/openbravo/modulescript/CreateDoctypeTemplate.java
---
(0027417)
harikrishnan   
2010-05-18 13:10   
Steps to test:

Give doc-type name as 60 characters and run update.database.

Root Cause:

Before, a string is appended along with the name.Now this is removed.

Impact.

Their is no impact because of this fix.
(0027431)
psarobe   
2010-05-18 14:56   
Testing doing code review. The fix is correct
(0027592)
hudsonbot   
2010-05-20 11:15   
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/7203ab098ac5 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/a7901e097e1a [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17407.obx [^]