Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037322Openbravo ERP00. Application dictionarypublic2017-11-18 13:172021-07-21 12:36
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR21Q4 
Core
No
0037322: Remove technically useless ad_process entries
The ad_process table as a few rows which are technically useless because they call into one of the 3 following classes:

a.) as they do not contain either of:
- matching ad_model_object row
- procedurename value
- javaclass value
- jrname value

b.) They do contain a procedurename but no pl function with that name exists
Note: Manually excluded dba_recompile which is created only on oracle db

c.) They do contain a javaclass but that javaclass does not exist

That mean that they are technically not useful for anything and can be removed.
a.)
select p.isactive,p.ad_process_id, p.name, p.procedurename, p.classname, p.jrname from ad_process p where not exists (select 1 from ad_model_object mo where mo.ad_process_id = p.ad_process_id) and p.procedurename is null and p.classname is null and p.jrname is null order by p.ad_process_id

b.)
select p.isactive,p.ad_process_id, p.name, p.procedurename, p.classname, p.jrname from ad_process p where not exists (select 1 from ad_model_object mo where mo.ad_process_id = p.ad_process_id) and not exists (select 1 from information_schema.routines r where r.routine_schema = 'public' and r.routine_name ilike p.procedurename) and p.procedurename is not null and p.procedurename <> 'DBA_Recompile' and p.classname is null and p.jrname is null;
Double-check the argumentation above delete those useless ad_process entries and their related rows (ad_menu, ad_treenode related to the menu entries, ad_process_access)
No tags attached.
related to defect 0037478 closed Triage Finance Modules Replace ad_element reference to core for a to be removed element with a new custom one in the module 
related to defect 0047421 closed shuehner Openbravo ERP API changes: to remove ad_process entries without any content 
has duplicate feature request 0005058 closed jonalegriaesarte Openbravo ERP Unused not working Process: RV_Order_Open 
blocks design defect 0032688 acknowledged Triage Platform Base Openbravo ERP remove unused resources 
causes defect 0047865 closed alostale Openbravo ERP It is not possible to create a new client using the default roles 
Issue History
2017-11-18 13:17shuehnerNew Issue
2017-11-18 13:17shuehnerAssigned To => shuehner
2017-11-18 13:17shuehnerModules => Core
2017-11-18 13:17shuehnerTriggers an Emergency Pack => No
2017-11-18 13:17shuehnerRelationship addedblocks 0032688
2017-11-18 13:25shuehnerDescription Updatedbug_revision_view_page.php?rev_id=16309#r16309
2017-11-18 13:25shuehnerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16311#r16311
2017-11-18 14:44shuehnerNote Added: 0100603
2017-12-10 16:35shuehnerRelationship addedrelated to 0037441
2017-12-14 13:19shuehnerRelationship addedrelated to 0037478
2021-07-16 14:11shuehnerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22893#r22893
2021-07-16 16:53hgbotNote Added: 0130547
2021-07-19 11:45hgbotNote Added: 0130561
2021-07-19 11:45hgbotNote Added: 0130562
2021-07-19 12:19hgbotNote Added: 0130563
2021-07-19 14:14hgbotNote Added: 0130578
2021-07-19 14:25hgbotNote Added: 0130579
2021-07-19 16:54shuehnerNote Edited: 0100603bug_revision_view_page.php?bugnote_id=0100603#r22897
2021-07-21 10:57hgbotNote Added: 0130632
2021-07-21 10:57hgbotNote Added: 0130633
2021-07-21 10:57hgbotNote Added: 0130634
2021-07-21 10:57hgbotNote Added: 0130635
2021-07-21 10:57hgbotNote Added: 0130636
2021-07-21 10:57hgbotNote Added: 0130637
2021-07-21 10:57hgbotNote Added: 0130638
2021-07-21 10:57hgbotNote Added: 0130639
2021-07-21 10:57hgbotNote Added: 0130640
2021-07-21 10:57hgbotNote Added: 0130641
2021-07-21 10:57hgbotNote Added: 0130642
2021-07-21 10:57hgbotNote Added: 0130644
2021-07-21 10:57hgbotNote Added: 0130645
2021-07-21 10:57hgbotNote Added: 0130646
2021-07-21 10:57hgbotNote Added: 0130647
2021-07-21 10:57hgbotResolutionopen => fixed
2021-07-21 10:57hgbotStatusnew => closed
2021-07-21 10:57hgbotFixed in Version => PR21Q4
2021-07-21 10:57hgbotNote Added: 0130648
2021-07-21 10:57hgbotNote Added: 0130649
2021-07-21 12:36shuehnerRelationship addedrelated to 0047421
2021-08-31 16:01shuehnerRelationship addedhas duplicate 0005058
2021-10-15 15:19martinsdanRelationship addedcauses 0047865

Notes
(0100603)
shuehner   
2017-11-18 14:44   
(edited on: 2021-07-19 16:54)
Stats for removal (with backoffice repo only)

obpi_pg=# select isactive, count(*) from ad_process group by 1;
 isactive | count
----------+-------
 Y | 290 -> 239
 N | 14 -> 14
(2 rows)

obpi_pg=# select isactive, count(*) from ad_process_para group by 1;
 isactive | count
----------+-------
 Y | 244 -> 153
 N | 1 -> 1
(2 rows)

obpi_pg=# select isactive, count(*) from ad_menu group by 1;
 isactive | count
----------+-------
 Y | 378 -> 378
 N | 58 -> 26
(2 rows)

(0130547)
hgbot   
2021-07-16 16:53   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/414 [^]
(0130561)
hgbot   
2021-07-19 11:45   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/merge_requests/15 [^]
(0130562)
hgbot   
2021-07-19 11:45   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/merge_requests/11 [^]
(0130563)
hgbot   
2021-07-19 12:19   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.warehouse.advancedwarehouseoperations.sampledata/-/merge_requests/4 [^]
(0130578)
hgbot   
2021-07-19 14:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/merge_requests/15 [^]
(0130579)
hgbot   
2021-07-19 14:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.pack/-/merge_requests/1 [^]
(0130632)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.pack [^]
Changeset: 973d8f7eeb6975aa9333aed2c37d57ff7e2efe4d
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-19T14:23:42+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.pack/-/commit/973d8f7eeb6975aa9333aed2c37d57ff7e2efe4d [^]

Related to ISSUE-37322: Cleanup configScript for removed processes

The configScript of retail.pack changed some processes to ISACTIVE=N.
Cleanup up those entries for the processes now being removed entirely.

---
M src-db/database/configScript.xml
---
(0130633)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.pack/-/merge_requests/1 [^]
(0130634)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/merge_requests/15 [^]
(0130635)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata [^]
Changeset: 3017b603c100f26caa610330369aa913852c3a6a
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-19T14:13:51+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/commit/3017b603c100f26caa610330369aa913852c3a6a [^]

Related to ISSUE-37322: Remove ad_process_access for remote processes.

Remote the auto-generated ad_process_access entries for the processes
which have been removed.

---
M referencedata/sampledata/The_White_Valley_Group/AD_PROCESS_ACCESS.xml
---
(0130637)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata [^]
Changeset: 9e01bee337b93f81ccfc81efb6e0fbfeedd61884
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-19T11:38:48+02:00
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/commit/9e01bee337b93f81ccfc81efb6e0fbfeedd61884 [^]

Related to ISSUE-37322: Remove ad_process_access for remote processes.

Remote the auto-generated ad_process_access entries for the processes
which have been removed.

---
M referencedata/sampledata/The_White_Valley_Group/AD_PROCESS_ACCESS.xml
---
(0130636)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/merge_requests/15 [^]
(0130638)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata [^]
Changeset: 9cb1f6057f613d4ad082102b5745ddaca70686e8
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-19T11:43:58+02:00
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/commit/9cb1f6057f613d4ad082102b5745ddaca70686e8 [^]

Related to ISSUE-37322: Remove ad_process_access for remote processes.

Remote the auto-generated ad_process_access entries for the processes
which have been removed.

---
M referencedata/sampledata/Retail_Test/AD_PROCESS_ACCESS.xml
---
(0130639)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/merge_requests/11 [^]
(0130640)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.warehouse.advancedwarehouseoperations.sampledata [^]
Changeset: 7fcbe4c543b42fdbe317991d2111c920128e80c9
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-19T12:18:41+02:00
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.warehouse.advancedwarehouseoperations.sampledata/-/commit/7fcbe4c543b42fdbe317991d2111c920128e80c9 [^]

Related to ISSUE-37322: Remove ad_process_access for remote processes.

Remote the auto-generated ad_process_access entries for the processes
which have been removed.

---
M referencedata/sampledata/AWO_QA/AD_PROCESS_ACCESS.xml
---
(0130641)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.warehouse.advancedwarehouseoperations.sampledata/-/merge_requests/4 [^]
(0130642)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 5f9e533fec3d0bb6c50404a2160ecf440dcf4427
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:07:11+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/5f9e533fec3d0bb6c50404a2160ecf440dcf4427 [^]

Related to ISSUE-37322. Remove useless ad_process entries

This removes several ad_process entries which do not have either of:
- Associated ad_model_object
- procedurename field filled
- classname field filled
- jrname field filled

As without any of those the process is not doing anything -> remove
them.

---
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_PROCESS.xml
M src-db/database/sourcedata/AD_PROCESS_PARA.xml
M src-db/database/sourcedata/AD_TREENODE.xml
---
(0130644)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d3668a0b0b2e3351e27d574cbb1c5d82465d4f9b
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:07:12+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d3668a0b0b2e3351e27d574cbb1c5d82465d4f9b [^]

Related to ISSUE-37322: Remove more usless ad_process entries

Those ad_process entry have their classname field filled.
However there are not java-classes present with the classname those
values.

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_PROCESS.xml
M src-db/database/sourcedata/AD_PROCESS_PARA.xml
M src-db/database/sourcedata/AD_TREENODE.xml
---
(0130645)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 9a5f956f579d7fb59c77cf86d34606f3d56b65de
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:07:12+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/9a5f956f579d7fb59c77cf86d34606f3d56b65de [^]

Related to ISSUE-37322: Cleanup AD_PROCESS_ACCESS for removed rows.

Remove references to AD_PROCESS_ACCESS for the removed processes.

---
M referencedata/sampledata/F_B_International_Group/AD_PROCESS_ACCESS.xml
M referencedata/sampledata/QA_Testing/AD_PROCESS_ACCESS.xml
---
(0130646)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 12de9600f50be24b357cc4cf1ae4ae3e421ab1fb
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:07:12+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/12de9600f50be24b357cc4cf1ae4ae3e421ab1fb [^]

Related to ISSUE-37322: Remove obsolete column c_projectline.dopricing

Earlier commit d918e6beee removed the ad_process_id=230 which was still
referenced by the ad_column_id=9873 which is a button (aka c_projectline.dopricing)

Remove that columnd and its (not displayed) field as they are useless
without a working process.
Reference a single reference to fhe field in C_PROJECT_WON pl-function
also which was just setting a default value for the column.

---
M src-db/database/model/functions/C_PROJECT_WON.xml
M src-db/database/model/tables/C_PROJECTLINE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0130647)
hgbot   
2021-07-21 10:57   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 5ff5ade9057071dc5aa0b12395f979ad414fd320
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:07:12+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/5ff5ade9057071dc5aa0b12395f979ad414fd320 [^]

Related to ISSUE-37322: Run synchronize terminology

Running synchronize terminology to remove ad_element entries which are
no longer referenced.

---
M src-db/database/sourcedata/AD_ELEMENT.xml
---
(0130648)
hgbot   
2021-07-21 10:57   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 226383c72ad6c73e7d75db18bc6fa7427af5a8e0
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-07-21T10:26:29+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/226383c72ad6c73e7d75db18bc6fa7427af5a8e0 [^]

Fixes ISSUE-37322: Delete ad_process entries not having any content.

This removes a number of ad_process entries not having any content
(java code, or pl-functiona or jrxml file) behind them to be ran.

Merge branch 'fr/37322-remove-useless-ad_process'

---
M referencedata/sampledata/F_B_International_Group/AD_PROCESS_ACCESS.xml
M referencedata/sampledata/QA_Testing/AD_PROCESS_ACCESS.xml
M src-db/database/model/functions/C_PROJECT_WON.xml
M src-db/database/model/tables/C_PROJECTLINE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_PROCESS.xml
M src-db/database/sourcedata/AD_PROCESS_PARA.xml
M src-db/database/sourcedata/AD_TREENODE.xml
---
(0130649)
hgbot   
2021-07-21 10:57   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/414 [^]