diff --git a/migration/iD10/oracle/202209101629_IDEMPIERE-5243.sql b/migration/iD10/oracle/202209101629_IDEMPIERE-5243.sql new file mode 100644 index 0000000000..9de20ffe33 --- /dev/null +++ b/migration/iD10/oracle/202209101629_IDEMPIERE-5243.sql @@ -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 +; + diff --git a/migration/iD10/postgresql/202209101629_IDEMPIERE-5243.sql b/migration/iD10/postgresql/202209101629_IDEMPIERE-5243.sql new file mode 100644 index 0000000000..30c7151128 --- /dev/null +++ b/migration/iD10/postgresql/202209101629_IDEMPIERE-5243.sql @@ -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 +; + diff --git a/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java b/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java index 8ff36d7cbf..c240156410 100644 --- a/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java +++ b/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java @@ -113,11 +113,15 @@ public class ProcessInfoUtil } // setSummaryFromDB /** - * Set Log of Process. + * Set Log of Process from Database JUST when they are not already in memory * @param pi process info */ 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()); String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_ID,Record_ID " + "FROM AD_PInstance_Log " @@ -171,7 +175,6 @@ public class ProcessInfoUtil logs[i].getAD_Table_ID(), logs[i].getRecord_ID()); il.save(); } - pi.setLogList(null); // otherwise log entries are twice } // saveLogToDB /**