Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048073Retail ModulesWeb POSpublic2021-11-16 14:342021-12-02 14:49
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
RR22Q1 
No
0048073: Remove leftover isMultiServer and 'servers' references from mobile.core
This is follow up to issue 47989.
This tracks the changes inside mobile.core module.

After issue 47989 the 'servers' list send from the backend to the frontend will b e always empty.

That allows to:
- Remove it from the responses
- Cleanup code/comments reading (empty) response and setting in localStorage
- Remove code reading servers from localStorage and setting it in 'servers' list
- Cleanup code calling isMultiServer (which is servers.size >1)
- cleanup & remove method RequestRouter.ignoreManifestLoadError() (always false)
-
No tags attached.
depends on defect 0048072 closed shuehner Remove leftover isMultiServer and 'servers' references from posterminal 
depends on defect 0047989 closed shuehner Remove obsolete storeserver related code from posterminal 
Issue History
2021-11-16 14:34shuehnerNew Issue
2021-11-16 14:34shuehnerAssigned To => Retail
2021-11-16 14:34shuehnerTriggers an Emergency Pack => No
2021-11-16 14:34shuehnerIssue generated from0048072
2021-11-16 14:34shuehnerRelationship addeddepends on 0048072
2021-11-16 14:35shuehnerRelationship addeddepends on 0047989
2021-12-02 12:14hgbotNote Added: 0133480
2021-12-02 14:45shuehnerAssigned ToRetail => shuehner
2021-12-02 14:49hgbotNote Added: 0133486
2021-12-02 14:49hgbotNote Added: 0133487
2021-12-02 14:49hgbotResolutionopen => fixed
2021-12-02 14:49hgbotStatusnew => closed
2021-12-02 14:49hgbotFixed in Version => RR22Q1
2021-12-02 14:49hgbotNote Added: 0133488
2021-12-02 14:49hgbotNote Added: 0133489

Notes
(0133480)
hgbot   
2021-12-02 12:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/306 [^]
(0133486)
hgbot   
2021-12-02 14:49   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 22b380bc38ee850fb29ea5fd1f67863f039a58be
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-11-30T15:31:17+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/22b380bc38ee850fb29ea5fd1f67863f039a58be [^]

Related to ISSUE-48073: Cleanup related to storeserver removal

Issue 47989 removed server-side code to populate the 'servers' list in
the reply of LoginUtilsServlet (it is always empty)

This follows up cleanup up code now obsolete:
- ob-terminal-model.js update comment to not mention servers list
  anymore
- ob-requestrouter.js
  Remove code reading 'servers' from localStorage which is not set
  anymore by either ob-terminal-model.js (or login-model.js in
  posterminal).
  With no server being added to the list the servers list will only
  contain the single entry name: 'Default'.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0133487)
hgbot   
2021-12-02 14:49   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 62ffc4781dd717e4f901514b751b364ffe8d0fe9
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-11-30T15:45:13+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/62ffc4781dd717e4f901514b751b364ffe8d0fe9 [^]

Related to ISSUE-48073: More code-cleanup related to storeserver removal

- loginOnCentralServer does nothing with isMultiServer() = false always
  Also the only call from posterminal is removed in 48072
  Delete the method
- That allows to also delete the now unused callCentralServer and
  callServer methods

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0133488)
hgbot   
2021-12-02 14:49   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 4555984b799ed4703fc1ad753115e394f59fecf7
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-12-02T14:30:15+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/4555984b799ed4703fc1ad753115e394f59fecf7 [^]

Fixes ISSUE-48073: More code-cleanup related to storeserver removal

- ignoreManifestLoadError delete function as will always return false
  and only user is removed in issue 48072
- isMultiServer() will always return false now with only a single
  name: 'Default' entry present in OB.RR.RequestRouter.servers list
  - Cleanup any usage of that function
    - checkFireOnlineNotification does nothing after this cleanup
      remove the function and the single call into it
    - Cleaning up setInterval(offlinePing) make the preference
      OBMOBC_RequestRouterPingTime obsolete. Remove it entirely.

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0133489)
hgbot   
2021-12-02 14:49   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/306 [^]