IDEMPIERE-5415 Incomplete process log when output is > 2000 chars (#1476)

This commit is contained in:
Carlos Ruiz 2022-09-11 09:22:52 +02:00 committed by GitHub
parent c5c05385ec
commit 3c69ba56a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,18 @@
-- IDEMPIERE-5243 More columns to increase length
SELECT register_migration_script('202209101629_IDEMPIERE-5243.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Sep 10, 2022, 4:29:13 PM CEST
UPDATE AD_Column SET FieldLength=4000, AD_Reference_ID=34,Updated=TO_TIMESTAMP('2022-09-10 16:29:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8781
;
-- Sep 10, 2022, 4:29:16 PM CEST
ALTER TABLE AD_PInstance_Log MODIFY P_Msg VARCHAR2(4000 CHAR) DEFAULT NULL
;
-- Sep 10, 2022, 4:30:03 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, NumLines=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-10 16:30:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10521
;

View File

@ -0,0 +1,15 @@
-- IDEMPIERE-5243 More columns to increase length
SELECT register_migration_script('202209101629_IDEMPIERE-5243.sql') FROM dual;
-- Sep 10, 2022, 4:29:13 PM CEST
UPDATE AD_Column SET FieldLength=4000, AD_Reference_ID=34,Updated=TO_TIMESTAMP('2022-09-10 16:29:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8781
;
-- Sep 10, 2022, 4:29:16 PM CEST
INSERT INTO t_alter_column values('ad_pinstance_log','P_Msg','VARCHAR(4000)',null,'NULL')
;
-- Sep 10, 2022, 4:30:03 PM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, NumLines=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-10 16:30:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10521
;

View File

@ -113,11 +113,15 @@ public class ProcessInfoUtil
} // setSummaryFromDB } // setSummaryFromDB
/** /**
* Set Log of Process. * Set Log of Process from Database JUST when they are not already in memory
* @param pi process info * @param pi process info
*/ */
public static void setLogFromDB (ProcessInfo pi) public static void setLogFromDB (ProcessInfo pi)
{ {
ProcessInfoLog m_logs[] = pi.getLogs();
if (m_logs != null && m_logs.length > 0)
return;
// s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID()); // s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID());
String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_ID,Record_ID " String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_ID,Record_ID "
+ "FROM AD_PInstance_Log " + "FROM AD_PInstance_Log "
@ -171,7 +175,6 @@ public class ProcessInfoUtil
logs[i].getAD_Table_ID(), logs[i].getRecord_ID()); logs[i].getAD_Table_ID(), logs[i].getRecord_ID());
il.save(); il.save();
} }
pi.setLogList(null); // otherwise log entries are twice
} // saveLogToDB } // saveLogToDB
/** /**