Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010709Openbravo ERPA. Platformpublic2009-09-23 10:542009-10-22 00:00
sathiyan 
marvintm 
urgentmajoralways
closedfixed 
20Ubuntu 9.04
pi 
 
Core
No
0010709: variable is misinterpreted by DBSource Manager if variable name with suffix TYPE
if we use the variable name with suffix of TYPE, For instance the variable name in our trigger is EM_ACCDEF_TYPE, It is interpreted like EM_ACCDEF_--TYPE when we apply ant task of update.database (or install.source).

We have attached trigger xml (ACCDEF_INVOICE_TRG.xml).

The complete code of interpreted by dbsourcemanager:

 CREATE FUNCTION ACCDEF_INVOICE_TRG()
RETURNS trigger
AS $BODY$ DECLARE

BEGIN
    IF AD_isTriggerEnabled()='N' THEN IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
    END IF;
        IF TG_OP = 'UPDATE' THEN
     IF(OLD.DOCSTATUS='CO' AND (OLD.EM_ACCDEF_--TYPE IS NULL AND NEW.EM_ACCDEF_TYPE IS NOT NULL) OR (OLD.EM_ACCDEF_TYPE IS NOT NULL AND NEW.EM_ACCDEF_TYPE IS NULL)) THEN
                        RAISE EXCEPTION '%', 'Document processed/posted'; --OBTG:-20501--
         END IF;
       
        END IF;
        IF TG_OP = 'DELETE' THEN
                IF(OLD.DOCSTATUS='CO') THEN
                        RAISE EXCEPTION '%', 'Document processed/posted'; --OBTG:-20501--
                END IF;
        END IF;
IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
Refine regular expresion to require a blank space before the 'type'
No tags attached.
xml ACCDEF_INVOICE_TRG.xml (773) 2009-09-23 10:54
https://issues.openbravo.com/file_download.php?file_id=1772&type=bug
Issue History
2009-09-23 10:54sathiyanNew Issue
2009-09-23 10:54sathiyanAssigned To => rafaroda
2009-09-23 10:54sathiyanFile Added: ACCDEF_INVOICE_TRG.xml
2009-09-23 12:43iciordiaAssigned Torafaroda => marvintm
2009-09-23 12:45iciordiaPrioritynormal => urgent
2009-09-23 12:45iciordiaSteps to Reproduce Updated
2009-09-23 15:20shuehnerIssue Monitored: shuehner
2009-09-28 11:53hgbotCheckin
2009-09-28 11:53hgbotNote Added: 0020394
2009-09-28 11:53hgbotStatusnew => resolved
2009-09-28 11:53hgbotResolutionopen => fixed
2009-09-28 11:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1 [^]
2009-09-29 14:18hgbotCheckin
2009-09-29 14:18hgbotNote Added: 0020519
2009-09-29 14:18hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1 [^] => http://code.openbravo.com/erp/devel/pi-pageddatagrid/rev/178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1 [^]
2009-10-21 15:26plujanStatusresolved => closed
2009-10-22 00:00anonymoussf_bug_id0 => 2883559

Notes
(0020394)
hgbot   
2009-09-28 11:53   
Repository: erp/devel/pi
Changeset: 178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Sep 25 17:47:39 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1 [^]

Fixed issue 10709. It should be possible now to use the word TYPE in PL/SQL without trouble, in PostgreSQL

---
M src-db/database/lib/dbsourcemanager.jar
---
(0020519)
hgbot   
2009-09-29 14:18   
Repository: erp/devel/pi-pageddatagrid
Changeset: 178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Sep 25 17:47:39 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi-pageddatagrid/rev/178bd53e1b9b8dce1afe03e408236ed9cf8a4fa1 [^]

Fixed issue 10709. It should be possible now to use the word TYPE in PL/SQL without trouble, in PostgreSQL

---
M src-db/database/lib/dbsourcemanager.jar
---