Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030720 | Openbravo ERP | A. Platform | public | 2015-09-01 16:22 | 2016-07-06 12:07 |
|
Reporter | shuehner | |
Assigned To | shuehner | |
Priority | normal | Severity | trivial | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q4 | |
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 | 0030720: Cleanup unused variables in pl-functions & triggers (platform part) |
Description | There are quite a few variables declared in in pl-functions & -triggers which are never used.
Those should be cleaned up.
Note: found using static analysis using plpgsql_check
This issue is split out of 27432 and handles part of platform team. |
Steps To Reproduce | Run plpgsql_check_function on all functions + trigger
And review output.
|
Proposed Solution | Delete the unused variables. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0027432 | | closed | Sanjota | Cleanup unused variables in pl-functions & triggers | related to | defect | 0033422 | | closed | Sanjota | Static code analysis: triggers |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-09-01 16:22 | shuehner | New Issue | |
2015-09-01 16:22 | shuehner | Assigned To | => shuehner |
2015-09-01 16:22 | shuehner | OBNetwork customer | => No |
2015-09-01 16:22 | shuehner | Modules | => Core |
2015-09-01 16:22 | shuehner | Triggers an Emergency Pack | => No |
2015-09-01 16:22 | shuehner | Issue generated from | 0027432 |
2015-09-01 16:22 | shuehner | Relationship added | related to 0027432 |
2015-09-02 10:05 | shuehner | Note Added: 0080009 | |
2015-09-02 10:06 | shuehner | Review Assigned To | => alostale |
2015-09-02 10:07 | hgbot | Checkin | |
2015-09-02 10:07 | hgbot | Note Added: 0080011 | |
2015-09-02 10:07 | hgbot | Status | new => resolved |
2015-09-02 10:07 | hgbot | Resolution | open => fixed |
2015-09-02 10:07 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/f41aa6109535a38a4d9161649f2fd1de4d987390 [^] |
2015-09-10 10:25 | alostale | Note Added: 0080311 | |
2015-09-10 10:25 | alostale | Status | resolved => closed |
2015-09-10 10:25 | alostale | Fixed in Version | => 3.0PR15Q4 |
2015-09-10 10:29 | alostale | Note Edited: 0080311 | bug_revision_view_page.php?bugnote_id=0080311#r9417 |
2016-07-06 12:07 | vmromanos | Relationship added | related to 0033422 |
Notes |
|
|
Notes for review:
All cases have been found by plpgsql_check static analysis tool but then also manually verified by checking the .xml source file in an editor.
And for each case search for the allegedly unused variable in all file to verify it is not used at all
That same procedure can be used to verify that the deleted variables are in fact not used.
NOTE: search must be done case-insensitive as pl does allow that when using variables. |
|
|
(0080011)
|
hgbot
|
2015-09-02 10:07
|
|
Repository: erp/devel/pi
Changeset: f41aa6109535a38a4d9161649f2fd1de4d987390
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Sep 01 16:28:36 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f41aa6109535a38a4d9161649f2fd1de4d987390 [^]
Fixed 30720. Remove most unused variables from pl functions & triggers.
That takes care of the big bunch of those warnings keeping only the ones
having some special case to be looked at in more detail.
All found using plpgsql_check tool.
---
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_MENU_PARAM_MOD_TRG.xml
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PARAMETER_MOD_TRG.xml
M modules/org.openbravo.client.kernel/src-db/database/model/triggers/OBCLKER_TEMPLATE_DEPEND_TRG.xml
M modules/org.openbravo.client.myob/src-db/database/model/triggers/OBKMO_WIDGET_CLASS_MOD_TRG.xml
M modules/org.openbravo.client.myob/src-db/database/model/triggers/OBKMO_WIDGET_URL_MOD_TRG.xml
M modules/org.openbravo.service.datasource/src-db/database/model/triggers/OBSERDS_DATASOURCE_FIELD_TRG.xml
M modules/org.openbravo.userinterface.selector/src-db/database/model/triggers/OBUISEL_SELECTOR_FLD_MOD_TRG.xml
M modules/org.openbravo.userinterface.selector/src-db/database/model/triggers/OBUISEL_SELECTOR_TRL_TRG.xml
M src-db/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml
M src-db/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml
M src-db/database/model/functions/AD_GETTAB_FROM_TABLE.xml
M src-db/database/model/functions/AD_GET_NODE_TREE_BYLEVEL.xml
M src-db/database/model/functions/AD_ORG_READY.xml
M src-db/database/model/functions/AD_TABLE_IMPORT.xml
M src-db/database/model/functions/AD_TAB_COPY.xml
M src-db/database/model/functions/AD_TAB_IMPORT.xml
M src-db/database/model/prescript-PostgreSql.sql
M src-db/database/model/triggers/AD_EP_PROCEDURES_MOD_TRG.xml
M src-db/database/model/triggers/AD_EXTENSION_POINT_MOD_TRG.xml
M src-db/database/model/triggers/AD_MENU_TRG.xml
M src-db/database/model/triggers/AD_MODULE_TRG.xml
M src-db/database/model/triggers/AD_MODULE_TRG2.xml
M src-db/database/model/triggers/AD_ORG_TRG.xml
---
|
|
|
(0080311)
|
alostale
|
2015-09-10 10:25
(edited on: 2015-09-10 10:29) |
|
code reviewed
additional test was performed:
1. In an Oracle instance invoke: call dba_recompile(null)
2. Check dbsm output -> "All valid" message is shown
3. Check all objects are in valid status
In case any used variable would have been deleted this would have been the result of the test:
* dbsm output would have informed about the invalid object
* an error like "Error(42,34): PLS-00201: identifier 'V_DATENULL' must be declared" would be seen for those objects
|
|