From 3a009bfcb4c8e8243441a57e809826310ef8b487 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 4 Aug 2011 23:18:46 -0500 Subject: [PATCH] fixes IDEMPIERE-50 Migration script never uses project comment http://jira.idempiere.com/browse/IDEMPIERE-50 --- org.adempiere.base/src/org/compiere/dbPort/Convert.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index 9564056301..66c002bfce 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -542,7 +542,13 @@ public abstract class Convert private static void writeLogMigrationScript(Writer w, String statement) throws IOException { - String prm_COMMENT = MSysConfig.getValue("DICTIONARY_ID_COMMENTS"); + boolean isUseCentralizedID = "Y".equals(MSysConfig.getValue("DICTIONARY_ID_USE_CENTRALIZED_ID", "Y")); // defaults to Y + boolean isUseProjectCentralizedID = "Y".equals(MSysConfig.getValue("PROJECT_ID_USE_CENTRALIZED_ID", "N")); // defaults to N + String prm_COMMENT; + if (!isUseCentralizedID && isUseProjectCentralizedID) + prm_COMMENT = MSysConfig.getValue("PROJECT_ID_COMMENTS"); + else + prm_COMMENT = MSysConfig.getValue("DICTIONARY_ID_COMMENTS"); // log time and date SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.DateTime); String dateTimeText = format.format(new Timestamp(System.currentTimeMillis()));