details:   https://code.openbravo.com/erp/devel/pi/rev/dcb9af89d341
changeset: 33418:dcb9af89d341
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Fri Feb 09 11:32:12 2018 +0100
summary:   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.

diffstat:

 src-db/database/sourcedata/AD_COLUMN.xml         |  4 ++--
 src-db/database/sourcedata/AD_FIELD.xml          |  1 -
 src/org/openbravo/scheduling/ProcessMonitor.java |  6 ++----
 3 files changed, 4 insertions(+), 7 deletions(-)

diffs (62 lines):

diff -r 3d95f9654e98 -r dcb9af89d341 src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml  Fri Feb 09 10:56:05 2018 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml  Fri Feb 09 11:32:12 2018 +0100
@@ -277539,7 +277539,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>
@@ -289336,7 +289336,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>
diff -r 3d95f9654e98 -r dcb9af89d341 src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml   Fri Feb 09 10:56:05 2018 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml   Fri Feb 09 11:32:12 2018 +0100
@@ -303807,7 +303807,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>
diff -r 3d95f9654e98 -r dcb9af89d341 
src/org/openbravo/scheduling/ProcessMonitor.java
--- a/src/org/openbravo/scheduling/ProcessMonitor.java  Fri Feb 09 10:56:05 
2018 +0100
+++ b/src/org/openbravo/scheduling/ProcessMonitor.java  Fri Feb 09 11:32:12 
2018 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to