Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027148 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2014-07-22 11:32 | 2014-08-08 18:53 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR14Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | a1bf5514b421 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | shankarb | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027148: Module org.openbravo.module.resources cannot be uninstalled | |||||||
Description | At least in some cases that module is uninstallable. This shows itself when having a db with that module used, then deleting the module folder and running update.database. It fails with a fk-violation of an ad_tree entry pointing to a ad_table (obre_resource_category, B47E504D23D549A5A9CD9A9A426D20AF) shipped in that module. As the ad_tree.ad_table-id fk is not defined as onDelete cascade this tree is not deleted and the module uninstall fails (note: only if some ad_tree entries to point to an ad_table of that module, not sure if that always is the case, but observed in at least 1 customer install). However fixing that is not enough as the ad_tree pointing to that table are referenced from ad_clientinfo.AD_TREE_OBRE_RESOURCE_CATEGORY field. Note those entries in ad_tree being referenced are auto-creaed by a modulescript. Talking to vma he said that this field in ad_clientinfo is not used at all in core but only by this module. However it had to be added to core back then for technical reason. Based on that it is find to add onDelete="setnull" to this field. The combination of those 2 changes lets an update.db run suceed without error. | |||||||
Steps To Reproduce | Take pigrape1207 db available from shu Combine it with sources of PR14Q2.4 + RR14Q2.1 run update.database Maybe also reproducible by taking pi + installing that module Then verifying that the auto-created ad_tree entries point to some ad_table in that module and that they are referenced by ad_clientinfo. Having that fullfilled should be enough to trigger the uninstallation problem. | |||||||
Proposed Solution | - Add onDelete="cascade" to fk-definition in ad_tree pointing to ad_table - Add onDelete="setnull" to fk-definition in ad_clientinfo of field AD_TREE_OBRE_RESOURCE_CATEGORY pointin to ad_tree | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0068792) alostale (manager) 2014-07-22 12:14 |
It can be reproduced by installing org.openbravo.module.resources and its org.openbravo.portal.member.roles dependency in a fresh pi |
(0068795) hgbot (developer) 2014-07-22 12:31 |
Repository: erp/devel/pi Changeset: a1bf5514b4218cf4a36c0353ff6e59f0c0e346aa Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Jul 22 12:29:37 2014 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/a1bf5514b4218cf4a36c0353ff6e59f0c0e346aa [^] fixed bug 27148: can't uninstall modules defining tree tables --- M src-db/database/model/tables/AD_CLIENTINFO.xml M src-db/database/model/tables/AD_TREE.xml --- |
(0068994) shankarb (reporter) 2014-07-31 06:31 |
Code reviewed and verified in pi changeset be933e11432c. |
(0069207) hudsonbot (developer) 2014-08-08 18:53 |
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/4450016dee64 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2014-07-22 11:32 | shuehner | New Issue | |
2014-07-22 11:32 | shuehner | Assigned To | => AugustoMauch |
2014-07-22 11:32 | shuehner | Modules | => Core |
2014-07-22 11:32 | shuehner | Triggers an Emergency Pack | => No |
2014-07-22 11:33 | shuehner | Proposed Solution updated | |
2014-07-22 11:34 | shuehner | Relationship added | related to 0022403 |
2014-07-22 11:35 | shuehner | Relationship added | related to 0025906 |
2014-07-22 11:50 | alostale | Assigned To | AugustoMauch => alostale |
2014-07-22 12:14 | alostale | Note Added: 0068792 | |
2014-07-22 12:30 | alostale | Review Assigned To | => shankarb |
2014-07-22 12:31 | hgbot | Checkin | |
2014-07-22 12:31 | hgbot | Note Added: 0068795 | |
2014-07-22 12:31 | hgbot | Status | new => resolved |
2014-07-22 12:31 | hgbot | Resolution | open => fixed |
2014-07-22 12:31 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a1bf5514b4218cf4a36c0353ff6e59f0c0e346aa [^] |
2014-07-22 12:39 | alostale | Relationship added | related to 0027152 |
2014-07-31 06:31 | shankarb | Note Added: 0068994 | |
2014-07-31 06:31 | shankarb | Status | resolved => closed |
2014-07-31 06:31 | shankarb | Fixed in Version | => 3.0PR14Q4 |
2014-08-08 18:53 | hudsonbot | Checkin | |
2014-08-08 18:53 | hudsonbot | Note Added: 0069207 |
Copyright © 2000 - 2009 MantisBT Group |