Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041168Openbravo ERPA. Platformpublic2019-06-25 09:432019-06-25 10:24
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
No
0041168: API Change: on delete cascade added to ad_alert.ad_alertrule_id foreign key
The ad_alert.ad_alertrule_id foreign key has been modified in this issue [1] to fix a problem that could result in a failed update.database when removing a module.

To Openbravo users, the only difference now is that when they remove an alert rule that had an alert, the alert will be removed along with the alert rule. Before the change, the alert rule deletion failed and an error message was shown to the user.

[1] https://issues.openbravo.com/view.php?id=41149 [^]
-
Approved
caused by defect 0041149 closed AugustoMauch It is not possible to delete a module if an alert rule references one of its tabs 
Issue History
2019-06-25 09:43AugustoMauchNew Issue
2019-06-25 09:43AugustoMauchAssigned To => AugustoMauch
2019-06-25 09:43AugustoMauchModules => Core
2019-06-25 09:43AugustoMauchTriggers an Emergency Pack => No
2019-06-25 10:18dmitry_mezentsevTag Attached: Approved
2019-06-25 10:20AugustoMauchNote Added: 0112997
2019-06-25 10:22hgbotCheckin
2019-06-25 10:22hgbotNote Added: 0112998
2019-06-25 10:22hgbotStatusnew => resolved
2019-06-25 10:22hgbotResolutionopen => fixed
2019-06-25 10:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/api-checks/rev/058029790c67cfae359587d5145e2ac3f83e7676 [^]
2019-06-25 10:23AugustoMauchRelationship addedcaused by 0041149
2019-06-25 10:24caristuReview Assigned To => caristu
2019-06-25 10:24caristuNote Added: 0113000
2019-06-25 10:24caristuStatusresolved => closed
2019-06-25 10:24caristuFixed in Version => 3.0PR19Q3

Notes
(0112997)
AugustoMauch   
2019-06-25 10:20   
Approved by DME
(0112998)
hgbot   
2019-06-25 10:22   
Repository: erp/devel/api-checks
Changeset: 058029790c67cfae359587d5145e2ac3f83e7676
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 25 10:22:12 2019 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/058029790c67cfae359587d5145e2ac3f83e7676 [^]

Fixes issue 41168: API Change, on delete cascade added to foreign key

An on delete cascade clause has been added to ad_alert.ad_alertrule_id foreign key.

Without it, update.database would fail when removing a module that defined a tab
that was referenced by an alert rule, if that alert rule had generated any alerts.

---
M model/src-db/database/model/tables/AD_ALERT.xml
---
(0113000)
caristu   
2019-06-25 10:24   
Reviewed