Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023996Openbravo ERPA. Platformpublic2013-06-05 13:572013-06-20 02:07
AugustoMauch 
AugustoMauch 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP243.0MP24 
shankarb
Core
No
0023996: Replace a business event handler with database constraints
A business event handler (TableDataOriginEventHandler) made for the Datasource based tables project should be replace with a constraint. Using a constraint is more simple and easier to maintain.

Two new constraints are needed:
- If the data origin of the table if 'Datasource', the obserds_datasource_id column can not be null
- If the data origin of the table if 'Table', the classname column can not be null
-
No tags attached.
Issue History
2013-06-05 13:57AugustoMauchNew Issue
2013-06-05 13:57AugustoMauchAssigned To => AugustoMauch
2013-06-05 13:57AugustoMauchModules => Core
2013-06-05 13:57AugustoMauchTriggers an Emergency Pack => No
2013-06-05 13:59AugustoMauchIssue Monitored: shankarb
2013-06-05 13:59AugustoMauchReview Assigned To => shankarb
2013-06-05 14:04hgbotCheckin
2013-06-05 14:04hgbotNote Added: 0059184
2013-06-05 14:04hgbotStatusnew => resolved
2013-06-05 14:04hgbotResolutionopen => fixed
2013-06-05 14:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/742895bc82e39bc81343889a914fa757bc653d7e [^]
2013-06-05 14:07AugustoMauchNote Added: 0059185
2013-06-05 15:58hgbotCheckin
2013-06-05 15:58hgbotNote Added: 0059190
2013-06-05 15:58hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/742895bc82e39bc81343889a914fa757bc653d7e [^] => http://code.openbravo.com/erp/devel/pi/rev/9160220305813321f47098adf51a02f0e3d838aa [^]
2013-06-05 16:25shankarbNote Added: 0059191
2013-06-05 16:25shankarbStatusresolved => closed
2013-06-05 16:25shankarbFixed in Version => 3.0MP24
2013-06-05 18:06hgbotCheckin
2013-06-05 18:06hgbotNote Added: 0059198
2013-06-05 18:48hgbotCheckin
2013-06-05 18:48hgbotNote Added: 0059200
2013-06-20 02:07hudsonbotCheckin
2013-06-20 02:07hudsonbotNote Added: 0059542
2013-06-20 02:07hudsonbotCheckin
2013-06-20 02:07hudsonbotNote Added: 0059543

Notes
(0059184)
hgbot   
2013-06-05 14:04   
Repository: erp/devel/pi
Changeset: 742895bc82e39bc81343889a914fa757bc653d7e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jun 05 14:03:22 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/742895bc82e39bc81343889a914fa757bc653d7e [^]

Fixes issue 23996: An event handler has been replaced with database constraints

The event handler TableDataOriginEventHandler has been replaced with database constraints. This is a better approach because it is simpler and easier to maint
ain.

The name of two of the messages has been updated so that it is the name as the constraint that throw them. The message used to warn the user that the table_name must be set if the data origin is 'Table' has been removed because now the table_name is mandatory again in the database.

---
M src-db/database/model/tables/AD_TABLE.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
R modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableDataOriginEventHandler.java
---
(0059185)
AugustoMauch   
2013-06-05 14:07   
Test plan:
- Test that the class name constraint works
- Open an existing table.
- Delete the classname field and try to save.

- Test that the datasource constraint works
- Create a new datasource in the application dictionary, check the Use as Table data origin
- Create a new Table. Set Data origin to 'Datasource'. Try to save the record leaving the datasource field empty.
(0059190)
hgbot   
2013-06-05 15:58   
Repository: erp/devel/pi
Changeset: 9160220305813321f47098adf51a02f0e3d838aa
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jun 05 15:57:57 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9160220305813321f47098adf51a02f0e3d838aa [^]

Fixes issue 23996: String is compared in constraint after being upper cased

---
M src-db/database/model/tables/AD_TABLE.xml
---
(0059191)
shankarb   
2013-06-05 16:25   
Code reviewed and tested in pi changeset 916022030581
(0059198)
hgbot   
2013-06-05 18:06   
Repository: erp/devel/api-checks
Changeset: 346b87db66a122176fee01e4f22b798216f65775
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jun 05 18:05:53 2013 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/346b87db66a122176fee01e4f22b798216f65775 [^]

Related to issue 0023996: Fixes API change

This API change is a false positive. Two contraints have been added to the AD_TABLE table, but all registers of all openbravo instances are going to comply with it, because nobody has created yet a Datasource Based Table.

---
M model/src-db/database/model/tables/AD_TABLE.xml
---
(0059200)
hgbot   
2013-06-05 18:48   
Repository: erp/devel/api-checks
Changeset: 63a874549bf3e899400ab7bfc2fc3c0577495476
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Jun 05 18:48:35 2013 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/63a874549bf3e899400ab7bfc2fc3c0577495476 [^]

Related to issue 23996: ack 2nd part of false positive
Related to previous commit. A EventHandler was deleted.
As it was never published yet -> false positive.

---
M java/reference/java.japi.gz
---
(0059542)
hudsonbot   
2013-06-20 02:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5caf871044ad [^]

Maturity status: Test
(0059543)
hudsonbot   
2013-06-20 02:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5caf871044ad [^]

Maturity status: Test