Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0018726 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] 00. Application dictionary | minor | always | 2011-10-07 11:27 | 2022-02-01 08:08 | ||||||
Reporter | roklenardic | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | pi | SCM revision | |||||||||
Review Assigned To | |||||||||||
Web browser | Google Chrome | ||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0018726: AD_TAB is missing a unique constraint for SEQNO | ||||||||||
Description | When creating tabs inside windows, it is currently possible to create two tabs within the same window with the SAME SEQNO. It is also possible to export and package the module without any validation error. But on installation of such module, it fails. | ||||||||||
Steps To Reproduce | 1) have a module in Development 2) create a new window 3) create tab 1 (SEQNO=10) and save 4) create tab 2 (SEQNO=10) and save a unique constraint error should be thrown. | ||||||||||
Proposed Solution | Add a unique constraint: ad_window_id+seqno | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0041549) shuehner (administrator) 2011-10-07 11:43 |
Note: probably not possible as can lead to module conflicting which each other when two independent modules add different tabs to the same window. So other proposal: 1.) add i.e. wad-validation to advise people of the problem 2.) change code using 'order by seqno' to read 'order by seqno,name' or similar to ensure a stable/predictable order is used in case of duplicate seqno-values 3.) add i.e. callout to verify that the duplicate seqno is avoided in the usecase described in the issue (to not have duplicates in the same module), note that smaller part could also be achieved by a unique constraint containing also ad_module_id) |
(0041553) roklenardic (developer) 2011-10-07 11:52 edited on: 2011-10-07 11:52 |
In that case, the module installation needs to be revised because currently it fails when two tabs have the same SEQNO within the same window. This is the error: database.postupdate.POSTGRE: [sql] Executing commands [sql] Failed to execute: SELECT AD_UPDATE_ACCESS() BUILD FAILED /opt/OpenbravoERP/build.xml:362: The following error occurred while executing this line: /opt/OpenbravoERP/build.xml:396: The following error occurred while executing this line: /opt/OpenbravoERP/build.xml:713: The following error occurred while executing this line: /opt/OpenbravoERP/src-db/database/build.xml:103: The following error occurred while executing this line: /opt/OpenbravoERP/src-db/database/build.xml:178: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ad_window_access_un_key" Where: SQL statement "INSERT INTO aD_Window_Access ( aD_Window_Access_ID, AD_Window_ID, AD_Role_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, IsReadWrite ) SELECT DISTINCT get_uuid(), AD_WINDOW.AD_WINDOW_ID, AD_ROLE.AD_ROLE_ID, AD_ROLE.AD_CLIENT_ID, AD_ROLE.AD_ORG_ID, 'Y', TO_DATE(NOW()), '0', TO_DATE(NOW()), '0', 'Y' FROM AD_WINDOW, AD_ROLE, AD_TAB, AD_TABLE WHERE AD_ROLE.ISMANUAL = 'N' AND AD_WINDOW.IsActive='Y' AND AD_WINDOW.AD_WINDOW_ID = AD_TAB.AD_WINDOW_ID AND AD_TAB.AD_TABLE_ID = AD_TABLE.AD_TABLE_ID AND ( (AD_ROLE.USERLEVEL = 'S' AND AD_TABLE.ACCESSLEVEL IN ('4','7','6')) OR (AD_ROLE.USERLEVEL IN (' CO', ' C') AND AD_TABLE.ACCESSLEVEL IN ('7','6','3','1')) OR (AD_ROLE.USERLEVEL = ' O' AND AD_TABLE.ACCESSLEVEL IN ('3','1','7')) ) AND AD_TAB.SEQNO = (SELECT MIN(SEQNO) FROM AD_TAB t WHERE t.AD_WINDOW_ID = AD_WINDOW.AD_WINDOW_ID) AND NOT EXISTS (SELECT 1 FROM AD_WINDOW_ACCESS WHERE AD_WINDOW_ID = AD_WINDOW.AD_WINDOW_ID AND AD_ROLE_ID = AD_ROLE.AD_ROLE_ID)" PL/pgSQL function "ad_update_access" line 90 at SQL statement |
(0045547) alostale (manager) 2012-02-28 16:40 |
Changing to design defect, as current design is not taking into account this case. |
(0052421) AugustoMauch (administrator) 2012-09-24 21:06 |
Impact: low Plan: mid |
Issue History | |||
Date Modified | Username | Field | Change |
2011-10-07 11:27 | roklenardic | New Issue | |
2011-10-07 11:27 | roklenardic | Assigned To | => alostale |
2011-10-07 11:27 | roklenardic | Web browser | => Google Chrome |
2011-10-07 11:27 | roklenardic | Modules | => Core |
2011-10-07 11:43 | shuehner | Note Added: 0041549 | |
2011-10-07 11:52 | roklenardic | Note Added: 0041553 | |
2011-10-07 11:52 | roklenardic | Note Edited: 0041553 | View Revisions |
2012-02-28 16:40 | alostale | Web browser | Google Chrome => Google Chrome |
2012-02-28 16:40 | alostale | Note Added: 0045547 | |
2012-02-28 16:40 | alostale | Type | defect => design defect |
2012-09-24 21:06 | AugustoMauch | Web browser | Google Chrome => Google Chrome |
2012-09-24 21:06 | AugustoMauch | Note Added: 0052421 | |
2012-09-24 21:06 | AugustoMauch | Status | new => scheduled |
2017-03-31 14:36 | alostale | Status | scheduled => acknowledged |
2017-04-10 14:33 | alostale | Assigned To | alostale => platform |
2022-02-01 08:08 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |