fixed bug 36829: can't display long process execution logs
authorDavid Miguelez <david.miguelez@openbravo.com>
Fri, 09 Feb 2018 11:32:12 +0100
changeset 32496 b5f399f8e0b1
parent 32495 c191a834ff54
child 32497 f328756bfc8e
fixed bug 36829: can't display long process execution logs

Even in database is defined as an arbitary lenght text, logs were truncated
to 4K characters. This artificial restriction has been removed, so that logs
can now be longer.
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_FIELD.xml
src/org/openbravo/scheduling/ProcessMonitor.java
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Mar 14 13:20:12 2019 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Fri Feb 09 11:32:12 2018 +0100
@@ -277261,7 +277261,7 @@
 <!--57B98D879415A967E040007F01013153-->  <COLUMNNAME><![CDATA[Log]]></COLUMNNAME>
 <!--57B98D879415A967E040007F01013153-->  <AD_TABLE_ID><![CDATA[7F900CBEF00C45D2833F897E12BAE86E]]></AD_TABLE_ID>
 <!--57B98D879415A967E040007F01013153-->  <AD_REFERENCE_ID><![CDATA[14]]></AD_REFERENCE_ID>
-<!--57B98D879415A967E040007F01013153-->  <FIELDLENGTH><![CDATA[10000]]></FIELDLENGTH>
+<!--57B98D879415A967E040007F01013153-->  <FIELDLENGTH><![CDATA[999999999]]></FIELDLENGTH>
 <!--57B98D879415A967E040007F01013153-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--57B98D879415A967E040007F01013153-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--57B98D879415A967E040007F01013153-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -288779,7 +288779,7 @@
 <!--6162397BD0FC4953E040007F0101559D-->  <COLUMNNAME><![CDATA[Log]]></COLUMNNAME>
 <!--6162397BD0FC4953E040007F0101559D-->  <AD_TABLE_ID><![CDATA[6567DD0C6715472CAE04255A4BEC4654]]></AD_TABLE_ID>
 <!--6162397BD0FC4953E040007F0101559D-->  <AD_REFERENCE_ID><![CDATA[14]]></AD_REFERENCE_ID>
-<!--6162397BD0FC4953E040007F0101559D-->  <FIELDLENGTH><![CDATA[4000]]></FIELDLENGTH>
+<!--6162397BD0FC4953E040007F0101559D-->  <FIELDLENGTH><![CDATA[999999999]]></FIELDLENGTH>
 <!--6162397BD0FC4953E040007F0101559D-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--6162397BD0FC4953E040007F0101559D-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--6162397BD0FC4953E040007F0101559D-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Mar 14 13:20:12 2019 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Fri Feb 09 11:32:12 2018 +0100
@@ -301533,7 +301533,6 @@
 <!--DA71ADAB26F24C678073FDB385634A66-->  <AD_COLUMN_ID><![CDATA[57B98D879415A967E040007F01013153]]></AD_COLUMN_ID>
 <!--DA71ADAB26F24C678073FDB385634A66-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--DA71ADAB26F24C678073FDB385634A66-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--DA71ADAB26F24C678073FDB385634A66-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
 <!--DA71ADAB26F24C678073FDB385634A66-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--DA71ADAB26F24C678073FDB385634A66-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--DA71ADAB26F24C678073FDB385634A66-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
--- a/src/org/openbravo/scheduling/ProcessMonitor.java	Thu Mar 14 13:20:12 2019 +0100
+++ b/src/org/openbravo/scheduling/ProcessMonitor.java	Fri Feb 09 11:32:12 2018 +0100
@@ -156,8 +156,6 @@
       final String executionId = (String) jec.get(EXECUTION_ID);
       Job jobInstance = jec.getJobInstance();
 
-      final String executionLog = bundle.getLog().length() >= 4000 ? bundle.getLog().substring(0,
-          3999) : bundle.getLog();
       String executionStatus;
 
       if (jee != null) {
@@ -169,7 +167,7 @@
       }
 
       ProcessRunData.update(getConnection(), ctx.getUser(), executionStatus,
-          getDuration(jec.getJobRunTime()), executionLog, executionId);
+          getDuration(jec.getJobRunTime()), bundle.getLog(), executionId);
 
       if (bundle.getGroupInfo() != null) {
         // Manage Process Group