From 56e680fedf3fc50a04a66ab21101a61dfddbab33 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 24 Jan 2007 05:43:15 +0000 Subject: [PATCH] Solve BUG ID 1643175 - Default Value(s) in process para badly defined --- .../013_increase_defaultvalue_length_processpara.sql | 12 ++++++++++++ dbPort/src/org/compiere/model/X_AD_Process_Para.java | 12 ++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 _Project-ID-ADempiere/sqls_3.1.3/013_increase_defaultvalue_length_processpara.sql diff --git a/_Project-ID-ADempiere/sqls_3.1.3/013_increase_defaultvalue_length_processpara.sql b/_Project-ID-ADempiere/sqls_3.1.3/013_increase_defaultvalue_length_processpara.sql new file mode 100644 index 0000000000..debeb56e87 --- /dev/null +++ b/_Project-ID-ADempiere/sqls_3.1.3/013_increase_defaultvalue_length_processpara.sql @@ -0,0 +1,12 @@ +ALTER TABLE ad_process_para +MODIFY(defaultvalue NVARCHAR2(2000)); + +ALTER TABLE ad_process_para +MODIFY(defaultvalue2 NVARCHAR2(2000)); + +UPDATE ad_column + SET updated = TO_DATE ('01/24/2007 00:40:17', 'MM/DD/YYYY HH24:MI:SS'), + fieldlength = 2000 + WHERE ad_column_id IN (3739, 5593); + +COMMIT; \ No newline at end of file diff --git a/dbPort/src/org/compiere/model/X_AD_Process_Para.java b/dbPort/src/org/compiere/model/X_AD_Process_Para.java index 4fc3ca9d5f..5cdba510bb 100644 --- a/dbPort/src/org/compiere/model/X_AD_Process_Para.java +++ b/dbPort/src/org/compiere/model/X_AD_Process_Para.java @@ -217,10 +217,10 @@ return (String)get_Value("ColumnName"); */ public void setDefaultValue (String DefaultValue) { -if (DefaultValue != null && DefaultValue.length() > 255) +if (DefaultValue != null && DefaultValue.length() > 2000) { -log.warning("Length > 255 - truncated"); -DefaultValue = DefaultValue.substring(0,254); +log.warning("Length > 2000 - truncated"); +DefaultValue = DefaultValue.substring(0,1999); } set_Value ("DefaultValue", DefaultValue); } @@ -236,10 +236,10 @@ return (String)get_Value("DefaultValue"); */ public void setDefaultValue2 (String DefaultValue2) { -if (DefaultValue2 != null && DefaultValue2.length() > 255) +if (DefaultValue2 != null && DefaultValue2.length() > 2000) { -log.warning("Length > 255 - truncated"); -DefaultValue2 = DefaultValue2.substring(0,254); +log.warning("Length > 2000 - truncated"); +DefaultValue2 = DefaultValue2.substring(0,1999); } set_Value ("DefaultValue2", DefaultValue2); }