Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminorhave not tried2019-07-24 14:042023-09-05 09:52
ReportervmromanosView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0041444: Delete AD_Preference linked to a property that is deleted

DescriptionIn Preference window (AD_Preference) you can define preferences linked to a property list (AD_Preference.Property). In this case the list is populated with any value from the "Property Configuration" Reference list (AD_REF_LIST.value).

Example, I have a property configuration reference called "My preference" with value "MYPREF". When this property is included into a Preference, the AD_Preference.Property will be "MYPREF".

If the reference list property is deleted from the Reference | List Reference tab (AD_REF_LIST), the Preference is not deleted and the Property field in the Preference window shows "*** Not found *" in form view (in grid view you can still see the old name).

Ideally any preference linked to a property list reference that was been deleted should be deleted too, as it has no sense and might be confusing. This is however not possible through a standard "FK on delete cascade", because there is not a unique constraint defined in AD_REF_LIST.value column.
Steps To ReproduceAs system admin.
Go to Module window and set as indevelopment the following modules: Core and Advanced Payables and Receivables Mngmt
Go to Preference window and search for preference with property "Implements Payment Monitor management". Keep it open
Go to Reference window and search for "Property Configuration".
Go to List Reference Tab and search for "PaymentMonitor". Delete it.
Go back to Preference window and refresh the record originally linked to the "Implements Payment Monitor management" property. Check the property now shows "*** Not found *" in form view (in grid view you can still see the old name)
Proposed SolutionTry to create a mechanism to automatically delete any preference linked to a property value that doesn't exist anymore in the AD_REF_LIST for the "Property Configuration" reference.
TagsNo tags attached.
Attached Filespng file icon notFoundProperty.png [^] (24,864 bytes) 2019-07-24 14:05

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0041445 newTriage Omni OMS Delete "Implements Payment Monitor management" Property Configuration List reference 

-  Notes
AugustoMauch (manager)
2019-08-26 08:46

dbsourcemanager does something similar for foreign keys, when the referenced AD record is removed, all entries referencing it are automatically removed.

This cannot be done for List reference, since foreign keys cannot be defined because the referencing column stores the search key of the ad_ref_list table, not its primary key.

An alternative would be to define a modulescript that automatically removes references to removed preferences, but for the time being it is not done because:
- It would have to be executed on each update.database (as opposed to most modulescripts that are executed only once)
- It is a partial solution that would require a modulescript per table that references an ad_ref_list bound to be removed.

- Issue History
Date Modified Username Field Change
2019-07-24 14:04 vmromanos New Issue
2019-07-24 14:04 vmromanos Assigned To => platform
2019-07-24 14:04 vmromanos Modules => Core
2019-07-24 14:04 vmromanos Triggers an Emergency Pack => No
2019-07-24 14:05 vmromanos File Added: notFoundProperty.png
2019-07-24 14:10 vmromanos Relationship added blocks 0041445
2019-08-26 08:46 AugustoMauch Note Added: 0114264
2019-08-26 08:46 AugustoMauch Type defect => design defect
2022-02-01 08:07 alostale Assigned To platform => Triage Platform Base
2023-09-05 09:52 sharab Note Added: 0154439
2023-09-05 10:46 priyam Note Deleted: 0154439

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker