Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048208Openbravo ERPA. Platformpublic2021-12-08 17:292022-10-31 10:36
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR23Q1 
Core
No
0048208: Cleanup left over code from 2.50 UI (WindowsTabs,LeftTabsBar,NavigationBar)
Those 3 files are used in every UI related manual servlet (i.e. all reports).

After removing the code-generation for the 2.50 UI (from Wad) there is still code left in here being obsolete now.

-
No tags attached.
depends on defect 0048206 closed shuehner Delete long obsolete OpenPentaho integration code 
blocks design defect 0032688 acknowledged Triage Platform Base remove unused resources 
Issue History
2021-12-08 17:29shuehnerNew Issue
2021-12-08 17:29shuehnerAssigned To => Triage Platform Base
2021-12-08 17:29shuehnerModules => Core
2021-12-08 17:29shuehnerTriggers an Emergency Pack => No
2021-12-08 17:29shuehnerRelationship addedblocks 0032688
2021-12-08 17:30shuehnerAssigned ToTriage Platform Base => shuehner
2021-12-08 17:30shuehnerRelationship addeddepends on 0048206
2021-12-08 19:18hgbotNote Added: 0133521
2022-10-31 09:04hgbotNote Added: 0142744
2022-10-31 10:36hgbotNote Added: 0142745
2022-10-31 10:36hgbotNote Added: 0142746
2022-10-31 10:36hgbotResolutionopen => fixed
2022-10-31 10:36hgbotStatusnew => closed
2022-10-31 10:36hgbotNote Added: 0142747
2022-10-31 10:36hgbotFixed in Version => PR23Q1
2022-10-31 10:36hgbotNote Added: 0142748

Notes
(0133521)
hgbot   
2021-12-08 19:18   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/467 [^]
(0142744)
hgbot   
2022-10-31 09:04   
Merge Request created: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/38 [^]
(0142745)
hgbot   
2022-10-31 10:36   
Repository: https://gitlab.com/openbravo/ci/backoffice-api [^]
Changeset: 809a9c683c78a799182279199a83a1cb8b89a324
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 31-10-2022 08:54:07
URL: https://gitlab.com/openbravo/ci/backoffice-api/-/commit/809a9c683c78a799182279199a83a1cb8b89a324 [^]

related to ISSUE-48208: API changes

The following Java elements have been removed:

  * org.openbravo.erpCommon.businessUtility.WindowTabs
    ** constructor WindowTabs(ConnectionProvider, VariablesSecureApp, int)
    ** constructor WindowTabs(ConnectionProvider, VariablesSecureApp, String, String)
    ** constructor WindowTabs(ConnectionProvider, VariablesSecureApp, String, String, boolean)
    ** constructor WindowTabs(ConnectionProvider, VariablesSecureApp, String, String, boolean, boolean)
  * org.openbravo.erpCommon.businessUtility.WindowTabsData
    ** field enabled
    ** field isactive
    ** field isbreadcrumb
    ** field isinfotab
    ** field istranslationtab
    ** field seqno
    ** field tablevel
    ** field tabnameid
    ** method select(onnectionProvider, String, String)
    ** method select(onnectionProvider, String, String, int, int)
    ** method selectMenu(ConnectionProvider, String, String)
    ** method selectProcessInfo(org.openbravo.database.ConnectionProvider, String)
    ** method selectProcessInfo(org.openbravo.database.ConnectionProvider, String, int, int)
  * org.openbravo.erpCommon.utility.LeftTabsBar
    ** method editionTemplate()
    ** method editionTemplate(boolean)
    ** method relationTemplate()

---
M java/reference/java.japi.gz
---
(0142746)
hgbot   
2022-10-31 10:36   
Merge request merged: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/38 [^]
(0142747)
hgbot   
2022-10-31 10:36   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/467 [^]
(0142748)
hgbot   
2022-10-31 10:36   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b7b7f49e9f81cb632c34ca696cab0411f467347c
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 31-10-2022 10:18:14
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b7b7f49e9f81cb632c34ca696cab0411f467347c [^]

fixes ISSUE-48208: Cleanup left over code from 2.50 UI

(WindowsTabs,LeftTabsBar,NavigationBar)

* Related utility code
  - LeftTabsTabs
    - remove editionTemplate & relatedTemplate methods which were used in
      2.50 WAD generated windows
  - WindowTabs
    - Cleanup several unused constructors
  - public WindowTabs(ConnectionProvider _conn, VariablesSecureApp _vars, int adProcessId)
     - Had last user in OpenPentaho being removed in issue 48206

* Simplify WindowTabs.getTabs removing the code-path for ad_model_object.action=W
  - Does not make sense anymore today
    - was used in the past for 2.50 generated tabs
      - skipped already in Wad since commit (5a8abd35f33) from being in
        web.xml
    - the this.WindowID element in fact is a
      ad_model_object_mapping.mappingname which will not find any
      ad_window_id

Code left will only every have a single tabAux entry (as searching
ad_menu via its pk).

That allows to cleanup:
  - Finding pos+ level for the tab in the list of tabs

* getTabsByLevel can be simplified after the previous cleanup as
  - First call will have pos=, tabsAux.length=1
    - That will always skip the first loop body
    - That will also skip 2nd loop body
      - That will keep nextPos at -1 removing the recursive call

* Simplify getTabsByLevel
  After previous change it can be further simplified to just
  add the single entry to this.breakcrumb and this.tabs

* Cleanup the various output generation methods given that we now have
always this.level = 0 and this.tabs.length = 1 and
this.breadCrumb.length=1
  - parentTabs
    There cannot be any
  - childTabs
    There cannot be any
  - mainTabs
    Cleanup as hasParent=false and action=W is obsolete
  - breadCrumb
    Cleanup as only single entry in the stack

* Further misc cleanup
  - WindowTabs
    - getMenuInfo remove action=W code-path as obsolete
      - That makes this.WindowID obsolete as well
    - remove getUrlCommand as it is no longer used
  - WindowTabs_data.xsql
    - Cleanup methods and fields which are not used in the caller
    - Remove select method as unused (need to add 2 type=void fields in
      next method (to be added to generated class)

---
M src/org/openbravo/erpCommon/businessUtility/WindowTabs.java
M src/org/openbravo/erpCommon/businessUtility/WindowTabs_data.xsql
M src/org/openbravo/erpCommon/utility/LeftTabsBar.java
---