Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0034833 | Openbravo ERP | A. Platform | public | 2016-12-30 11:58 | 2017-03-15 20:19 |
Reporter | inigosanchez | ||||
Assigned To | inigosanchez | ||||
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR17Q2 | |||
Merge Request Status | |||||
Review Assigned To | alostale | ||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0034833: audit triggers can have naming clashes | ||||
Description | Triggers created for audit trail can have clashes in naming, causing incorrect auditing in these cases. This occurs because of the way name is generated [1], which doesn't validate there is no function nor trigger with the same name. [1] https://code.openbravo.com/erp/devel/pi/file/2a03b4d16b5d/src-db/database/model/postscript-PostgreSql.sql#l421 [^] | ||||
Steps To Reproduce | 1. Log in as System Admin in an activated instance. 2. Open Table window and mark as audited OBKMO_Widget_Class_Menu and OBKMO_Widget_Class_Menu_Trl tables 3. Execute Update Audit Trail Infrastructure process 4. Check two triggers are created based on same function:
ERROR: this is incorrect, each trigger should have its own function 5. Execute Update Audit Trail Infrastructure process again ERROR: cannot drop function au_obkmo_widget_class_menu_trg() because other objects depend on it This occurs because function is tried to be dropped after dropping 1st trigger, but keeping 2nd one. | ||||
Proposed Solution | After generating trigger name, validate it doesn't exist before creating, if it exists generate a different name till it doesn't exist. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=10228&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-12-30 11:58 | inigosanchez | New Issue | |||
2016-12-30 11:58 | inigosanchez | Assigned To | => platform | ||
2016-12-30 11:58 | inigosanchez | File Added: errorAuditTrail.png | |||
2016-12-30 11:58 | inigosanchez | OBNetwork customer | => No | ||
2016-12-30 11:58 | inigosanchez | Modules | => Core | ||
2016-12-30 11:58 | inigosanchez | Triggers an Emergency Pack | => No | ||
2016-12-30 12:18 | inigosanchez | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=14137#r14137 | ||
2017-01-10 11:33 | alostale | Summary | Update Audit Trail Infrastructure process doesn't works properly under some circumstances => audit trigger can have naming clashes | ||
2017-01-10 11:33 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14230#r14230 | ||
2017-01-10 11:33 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=14231#r14231 | ||
2017-01-10 11:33 | alostale | Proposed Solution updated | |||
2017-01-10 11:33 | alostale | Summary | audit trigger can have naming clashes => audit triggers can have naming clashes | ||
2017-01-10 11:34 | alostale | Status | new => acknowledged | ||
2017-01-10 11:43 | alostale | Priority | low => high | ||
2017-02-02 15:03 | inigosanchez | Status | acknowledged => scheduled | ||
2017-02-02 15:03 | inigosanchez | Assigned To | platform => inigosanchez | ||
2017-02-06 12:52 | inigosanchez | Review Assigned To | => alostale | ||
2017-02-06 12:57 | hgbot | Checkin | |||
2017-02-06 12:57 | hgbot | Note Added: 0094080 | |||
2017-02-06 12:57 | hgbot | Status | scheduled => resolved | ||
2017-02-06 12:57 | hgbot | Resolution | open => fixed | ||
2017-02-06 12:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/f730600d5079cc23e1e5e8254ec5de3949a8f6a4 [^] | ||
2017-02-10 09:02 | alostale | Note Added: 0094211 | |||
2017-02-10 09:02 | alostale | Status | resolved => closed | ||
2017-02-10 09:02 | alostale | Fixed in Version | => 3.0PR17Q2 | ||
2017-03-15 20:19 | hudsonbot | Checkin | |||
2017-03-15 20:19 | hudsonbot | Note Added: 0095161 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|