Fixes bug 22974 II: it was missing some parameter
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Tue, 05 Feb 2013 17:51:50 +0100
changeset 19604 b721b6ed25cb
parent 19603 518e41079d86
child 19605 d40d6073a1dd
Fixes bug 22974 II: it was missing some parameter
src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/User1Ready.class
src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/User1ReadyData.class
src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready.java
src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready_data.xsql
Binary file src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/User1Ready.class has changed
Binary file src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/User1ReadyData.class has changed
--- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready.java	Tue Feb 05 16:51:04 2013 +0100
+++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready.java	Tue Feb 05 17:51:50 2013 +0100
@@ -42,7 +42,7 @@
           if(User1ReadyData.tableExists(cp, table)){
             for(String column: columns){
               if(User1ReadyData.columnExists(cp, column, table)){
-                if (!User1ReadyData.countUser1Usage(cp, table).equals("0")) {
+                if (!User1ReadyData.countUser1Usage(cp, table, column).equals("0")) {
           	  errors.add("You can not apply this MP because your instance fails in the pre-validation phase: User1 and User2 dimensions information needs to be properly migrated to newly created tables (User1 and User2). Please contact support.openbravo.com for further details");
                 }
               }
--- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready_data.xsql	Tue Feb 05 16:51:04 2013 +0100
+++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/User1Ready_data.xsql	Tue Feb 05 17:51:50 2013 +0100
@@ -53,8 +53,9 @@
       <Sql><![CDATA[
         SELECT COUNT(1) AS RECORDS
         FROM DUAL
-        WHERE EXISTS (SELECT 1 FROM A_Amortization WHERE USER1_ID IS NOT NULL OR USER2_ID IS NOT NULL)
+        WHERE EXISTS (SELECT 1 FROM A_Amortization WHERE  USER1_ID IS NOT NULL)
       ]]></Sql>
      <Parameter name="tableName" type="replace" optional="true" after="SELECT 1 FROM " text="A_Amortization"/>
+     <Parameter name="columnName" type="replace" optional="true" after="WHERE  " text="USER1_ID"/>
    </SqlMethod>
 </SqlClass>