Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0007805
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformcriticalalways2009-02-24 19:472009-07-26 22:43
Reportergorka_gilView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version2.50MP3
StatusclosedFix in branchpiFixed in SCM revision4930b9515f51
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_11
OS Version2.6.27-gentoo-r7Database version8.3.5Ant version1.7.1
Product Version2.50betaSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0007805: Unistall a module with ad_process fails

DescriptionUnistalling Hello World Process shows an error of database:

Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "ad_process" violates foreign key constraint "ad_process_request_ad_process" on table "ad_process_request"
  Detail: Key (ad_process_id)=(0202F5D291A84E9D9DF9EFD75FEB5E30) is still referenced from table "ad_process_request".
Steps To Reproduce1. Install and rebuild Hello World Process
2. Add a new record in its window and press the button.
3. Uninstall the module

Fails and shows the error.
Tags250MP3releasecandidate
Attached Fileslog file icon 20090224193513-apply.log [^] (43,062 bytes) 2009-02-24 19:53

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0008023main closedalostale cannot uninstall a refence data module that has been already applied 
related to defect 00207433.0MP13 closedmarvintm Reference data error appears when i rebuild the system after installing spanish localization pack 

-  Notes
(0014043)
pjuvara (reporter)
2009-02-25 07:45

Upgrading severity and priority as these are showstoppers for releasing beta.
(0014046)
alostale (manager)
2009-02-25 08:58

The problem is that when executing the action a new record in ad_process_request is created. This record is not part of the module so when uninstalling the module it is not removed and when trying to enable the constraints it is not possible because the referred record (which was in the module) does not longer exist.

We should ensure that in these cases the information not in module is also removed (would an on delete cascade be enough) when removing the parent record.

There are 25 cases that should also be reviewed, this Oracle query detects them:

select c1.table_name MODULE_REFERRED_TABLE,c.table_name NOT_MODULE_TABLE
from user_constraints c,
     user_constraints c1,
     ad_dataset_table s,
     ad_table t
where c.constraint_type='R'
  and c1.constraint_name = c.r_constraint_name
  and s.ad_dataset_id = '0'
  and s.ad_table_id = t.ad_table_id
  and c1.table_name = upper(t.tablename)
  and c.delete_rule !='CASCADE'
  and not exists (select 1
                    from ad_dataset_table dt, ad_table t1
                  where dt.ad_dataset_id = '0'
                    and t1.ad_table_id = dt.ad_table_id
                    and c.table_name = upper(t1.tablename))
order by 1,2;
(0017790)
hgbot (developer)
2009-07-03 13:10

Repository: erp/devel/pi
Changeset: 4930b9515f5167311d198cc6b06568f6262779e4
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Feb 25 10:55:02 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4930b9515f5167311d198cc6b06568f6262779e4 [^]

fixed bug 0007805: Unistall a module with ad_process fails

---
M src-db/database/model/tables/AD_ALERTRULE.xml
M src-db/database/model/tables/AD_ATTACHMENT.xml
M src-db/database/model/tables/AD_CHANGELOG.xml
M src-db/database/model/tables/AD_CLIENTMODULE.xml
M src-db/database/model/tables/AD_COLUMN_ACCESS.xml
M src-db/database/model/tables/AD_DIMENSION.xml
M src-db/database/model/tables/AD_IMPFORMAT.xml
M src-db/database/model/tables/AD_IMPFORMAT_ROW.xml
M src-db/database/model/tables/AD_NOTE.xml
M src-db/database/model/tables/AD_ORGMODULE.xml
M src-db/database/model/tables/AD_PREFERENCE.xml
M src-db/database/model/tables/AD_PROCESS_REQUEST.xml
M src-db/database/model/tables/AD_PROCESS_SCHEDULING.xml
M src-db/database/model/tables/AD_RECORD_ACCESS.xml
M src-db/database/model/tables/AD_REF_DATA_LOADED.xml
M src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml
M src-db/database/model/tables/C_DOCTYPE.xml
M src-db/database/model/tables/C_FILE.xml
M src-db/database/model/tables/FACT_ACCT.xml
M src-db/database/model/tables/I_ELEMENTVALUE.xml
---

- Issue History
Date Modified Username Field Change
2009-02-24 19:47 gorka_gil New Issue
2009-02-24 19:47 gorka_gil Assigned To => marvintm
2009-02-24 19:47 gorka_gil File Added: 20090224193930-apply.log
2009-02-24 19:47 gorka_gil Regression testing => No
2009-02-24 19:53 gorka_gil File Deleted: 20090224193930-apply.log
2009-02-24 19:53 gorka_gil File Added: 20090224193513-apply.log
2009-02-24 22:22 pjuvara version => 2.50beta
2009-02-25 07:45 pjuvara Note Added: 0014043
2009-02-25 07:45 pjuvara Priority high => urgent
2009-02-25 07:45 pjuvara Severity minor => critical
2009-02-25 08:58 alostale Note Added: 0014046
2009-02-25 09:40 alostale Assigned To marvintm => alostale
2009-02-25 13:57 alostale Status new => scheduled
2009-02-25 13:57 alostale fix_in_branch => trunk
2009-02-25 13:57 alostale Status scheduled => resolved
2009-02-25 13:57 alostale Fixed in Version => trunk
2009-02-25 13:57 alostale svn_revision => 3633
2009-02-25 13:57 alostale Resolution open => fixed
2009-03-09 12:16 alostale Relationship added has duplicate 0008023
2009-04-21 10:33 psarobe Status resolved => closed
2009-04-22 00:00 anonymous sf_bug_id 0 => 2778006
2009-07-03 13:10 hgbot Checkin
2009-07-03 13:10 hgbot Note Added: 0017790
2009-07-03 13:10 hgbot Status closed => resolved
2009-07-03 13:10 hgbot Fixed in SCM revision 3633 => http://code.openbravo.com/erp/devel/pi/rev/4930b9515f5167311d198cc6b06568f6262779e4 [^]
2009-07-21 16:24 psarobe Fixed in Version 2.50 => 2.50MP3
2009-07-21 16:26 psarobe Tag Attached: 250MP3releasecandidate
2009-07-26 22:43 psarobe Status resolved => closed
2012-06-19 15:30 alostale Relationship added related to 0020743


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker