IDEMPIERE-905 Post-it functionality / wrong column name - creating problems with native sequences

This commit is contained in:
Carlos Ruiz 2017-11-07 15:14:13 +01:00
parent 66f1055ae7
commit 725c76c994
6 changed files with 66 additions and 15 deletions

View File

@ -0,0 +1,27 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-905 Post-it functionality
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Element SET ColumnName='AD_PostIt_ID',Updated=TO_DATE('2017-11-07 15:09:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203056
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Column SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL, AD_Element_ID=203056 WHERE UPPER(ColumnName)='AD_POSTIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_InfoColumn SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
;
SELECT register_migration_script('201711071510_IDEMPIERE-905.sql') FROM dual
;

View File

@ -0,0 +1,24 @@
-- IDEMPIERE-905 Post-it functionality
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Element SET ColumnName='AD_PostIt_ID',Updated=TO_TIMESTAMP('2017-11-07 15:09:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203056
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Column SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL, AD_Element_ID=203056 WHERE UPPER(ColumnName)='AD_POSTIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
;
-- Nov 7, 2017 3:09:53 PM CET
UPDATE AD_InfoColumn SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
;
SELECT register_migration_script('201711071510_IDEMPIERE-905.sql') FROM dual
;

View File

@ -62,14 +62,14 @@ public interface I_AD_PostIt
*/ */
public int getAD_Org_ID(); public int getAD_Org_ID();
/** Column name AD_Postit_ID */ /** Column name AD_PostIt_ID */
public static final String COLUMNNAME_AD_Postit_ID = "AD_Postit_ID"; public static final String COLUMNNAME_AD_PostIt_ID = "AD_PostIt_ID";
/** Set Post-it */ /** Set Post-it */
public void setAD_Postit_ID (int AD_Postit_ID); public void setAD_PostIt_ID (int AD_PostIt_ID);
/** Get Post-it */ /** Get Post-it */
public int getAD_Postit_ID(); public int getAD_PostIt_ID();
/** Column name AD_PostIt_UU */ /** Column name AD_PostIt_UU */
public static final String COLUMNNAME_AD_PostIt_UU = "AD_PostIt_UU"; public static final String COLUMNNAME_AD_PostIt_UU = "AD_PostIt_UU";

View File

@ -29,7 +29,7 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20171031L; private static final long serialVersionUID = 20171107L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_PostIt (Properties ctx, int AD_PostIt_ID, String trxName) public X_AD_PostIt (Properties ctx, int AD_PostIt_ID, String trxName)
@ -37,7 +37,7 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
super (ctx, AD_PostIt_ID, trxName); super (ctx, AD_PostIt_ID, trxName);
/** if (AD_PostIt_ID == 0) /** if (AD_PostIt_ID == 0)
{ {
setAD_Postit_ID (0); setAD_PostIt_ID (0);
} */ } */
} }
@ -70,20 +70,20 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
} }
/** Set Post-it. /** Set Post-it.
@param AD_Postit_ID Post-it */ @param AD_PostIt_ID Post-it */
public void setAD_Postit_ID (int AD_Postit_ID) public void setAD_PostIt_ID (int AD_PostIt_ID)
{ {
if (AD_Postit_ID < 1) if (AD_PostIt_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Postit_ID, null); set_ValueNoCheck (COLUMNNAME_AD_PostIt_ID, null);
else else
set_ValueNoCheck (COLUMNNAME_AD_Postit_ID, Integer.valueOf(AD_Postit_ID)); set_ValueNoCheck (COLUMNNAME_AD_PostIt_ID, Integer.valueOf(AD_PostIt_ID));
} }
/** Get Post-it. /** Get Post-it.
@return Post-it */ @return Post-it */
public int getAD_Postit_ID () public int getAD_PostIt_ID ()
{ {
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Postit_ID); Integer ii = (Integer)get_Value(COLUMNNAME_AD_PostIt_ID);
if (ii == null) if (ii == null)
return 0; return 0;
return ii.intValue(); return ii.intValue();

View File

@ -98,7 +98,7 @@ public class VPostIt extends CDialog implements ChangeListener, ActionListener,
textPane.setBackground(AdempierePLAF.getFieldBackground_Inactive()); textPane.setBackground(AdempierePLAF.getFieldBackground_Inactive());
String createdupdated = null; String createdupdated = null;
if (m_postIt.getAD_Postit_ID() > 0) if (m_postIt.getAD_PostIt_ID() > 0)
createdupdated = m_postIt.getCreatedString(); createdupdated = m_postIt.getCreatedString();
String updated = m_postIt.getUpdatedString(); String updated = m_postIt.getUpdatedString();

View File

@ -75,7 +75,7 @@ public class WPostIt extends Window implements EventListener<Event>{
m_postIt = new MPostIt (Env.getCtx(), tableID, recordID, trxName); m_postIt = new MPostIt (Env.getCtx(), tableID, recordID, trxName);
String created = null; String created = null;
if (m_postIt.getAD_Postit_ID() > 0) if (m_postIt.getAD_PostIt_ID() > 0)
created = m_postIt.getCreatedString(); created = m_postIt.getCreatedString();
String updated = m_postIt.getUpdatedString(); String updated = m_postIt.getUpdatedString();