Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032582Retail ModulesWeb POSpublic2016-04-04 14:282016-06-24 12:09
Orekaria 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR16Q3 
Orekaria
No
0032582: Stabilization: Create an API for the localStorage
Stabilization: Create an API for the localStorage
Verify that the localstorage is called directly within the application code
A)
Create a new file for the new API.
Namespace could be OB.UTIL.localStorage

Given appname = OB.MobileApp.model.get('appName')

When the OB.UTIL.localStorage.get(key) is called, this should be the flow:
1- try to retrieve the value from localstorage.getItem(appname + '.' + key)
2- backward compatibility: if the value does not exists, try to retrieve the value from localstorage.getItem(key)

When the OB.UTIL.localStorage.set(key) is called, this should be the flow:
1- save the value with localstorage.setItem(appname + '.' + key)

Create a OB.UTIL.localStorage.clear method that:
1- will clear only the values of the appname


B)
In pi-mobile
- create a new java class to hold the calls to the localstorage API.
No tags attached.
blocks defect 0032571 closed jorge-garcia [SERQA 867] There is an if condition in mobile core that checks conditions about the logging terminal 
blocks defect 0032135 closed Orekaria Navigating to another terminal URL's, fails 
causes defect 0039009 closed migueldejuana Do not set terminalName with empty value 
Issue History
2016-04-04 14:28OrekariaNew Issue
2016-04-04 14:28OrekariaAssigned To => Retail
2016-04-04 14:28OrekariaTriggers an Emergency Pack => No
2016-04-04 14:29OrekariaProposed Solution updated
2016-04-04 14:30OrekariaRelationship addedblocks 0032571
2016-04-04 14:31OrekariaStatusnew => acknowledged
2016-04-04 14:47OrekariaProposed Solution updated
2016-04-04 14:51OrekariaRelationship addedblocks 0032135
2016-04-11 12:05jorge-garciaStatusacknowledged => scheduled
2016-04-11 12:05jorge-garciaAssigned ToRetail => jorge-garcia
2016-04-27 09:06hgbotCheckin
2016-04-27 09:06hgbotNote Added: 0086009
2016-04-27 09:07hgbotCheckin
2016-04-27 09:07hgbotNote Added: 0086010
2016-04-27 09:07hgbotCheckin
2016-04-27 09:07hgbotNote Added: 0086011
2016-04-29 13:06hgbotCheckin
2016-04-29 13:06hgbotNote Added: 0086075
2016-04-29 13:06hgbotCheckin
2016-04-29 13:06hgbotNote Added: 0086076
2016-04-29 13:07hgbotCheckin
2016-04-29 13:07hgbotNote Added: 0086077
2016-04-29 15:32hgbotCheckin
2016-04-29 15:32hgbotNote Added: 0086087
2016-04-29 15:32hgbotStatusscheduled => resolved
2016-04-29 15:32hgbotResolutionopen => fixed
2016-04-29 15:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a3ff6280122f4bd0324c7da33e53b7068e20def [^]
2016-04-29 15:34hgbotCheckin
2016-04-29 15:34hgbotNote Added: 0086089
2016-04-29 15:35hgbotCheckin
2016-04-29 15:35hgbotNote Added: 0086090
2016-04-29 15:35hgbotCheckin
2016-04-29 15:35hgbotNote Added: 0086091
2016-05-11 10:21hgbotCheckin
2016-05-11 10:21hgbotNote Added: 0086367
2016-06-01 10:27dmitry_mezentsevNote Added: 0086874
2016-06-02 16:04marvintmNote Added: 0086943
2016-06-02 16:04marvintmStatusresolved => new
2016-06-02 16:04marvintmResolutionfixed => open
2016-06-02 16:04marvintmStatusnew => scheduled
2016-06-21 12:50hgbotCheckin
2016-06-21 12:50hgbotNote Added: 0087719
2016-06-21 12:50hgbotCheckin
2016-06-21 12:50hgbotNote Added: 0087720
2016-06-21 12:51hgbotCheckin
2016-06-21 12:51hgbotNote Added: 0087721
2016-06-24 08:34hgbotCheckin
2016-06-24 08:34hgbotNote Added: 0087867
2016-06-24 08:35hgbotCheckin
2016-06-24 08:35hgbotNote Added: 0087868
2016-06-24 08:35hgbotStatusscheduled => resolved
2016-06-24 08:35hgbotResolutionopen => fixed
2016-06-24 08:35hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a3ff6280122f4bd0324c7da33e53b7068e20def [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e8271ef6d397765cea6aeab3639506edac7a625d [^]
2016-06-24 12:09OrekariaReview Assigned To => Orekaria
2016-06-24 12:09OrekariaStatusresolved => closed
2016-06-24 12:09OrekariaFixed in Version => RR16Q3
2018-07-20 12:50migueldejuanaRelationship addedcauses 0039009

Notes
(0086009)
hgbot   
2016-04-27 09:06   
Repository: erp/pmods/org.openbravo.retail.trainingmode
Changeset: 74d7c531c9c3f5a715934fb555d79d167e0b09a6
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:31:09 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.trainingmode/rev/74d7c531c9c3f5a715934fb555d79d167e0b09a6 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in trainingmode module.

---
M web/org.openbravo.retail.trainingmode/js/menu.js
M web/org.openbravo.retail.trainingmode/js/obrtm-utils.js
---
(0086010)
hgbot   
2016-04-27 09:07   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 20348411eeab06f1481fd9b69cec2d74b3acd2bd
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:29:32 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/20348411eeab06f1481fd9b69cec2d74b3acd2bd [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in sessions module.

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateInfo.js
M web/org.openbravo.retail.sessions/js/components/BusinessDateModel.js
M web/org.openbravo.retail.sessions/js/components/loginhook.js
M web/org.openbravo.retail.sessions/js/countcash/countcash-model.js
M web/org.openbravo.retail.sessions/js/countcash/countcash.js
---
(0086011)
hgbot   
2016-04-27 09:07   
Repository: erp/pmods/org.openbravo.retail.postest
Changeset: 33f678558b856969fedc1d580f919c14ad4dfd40
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:30:38 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/33f678558b856969fedc1d580f919c14ad4dfd40 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in postest module.

---
M web/org.openbravo.retail.postest/source/postest.js
---
(0086075)
hgbot   
2016-04-29 13:06   
Repository: erp/pmods/org.openbravo.retail.trainingmode
Changeset: a252dfe602c65fb3bd456270cd07c72b51aa67d1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:31:09 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.trainingmode/rev/a252dfe602c65fb3bd456270cd07c72b51aa67d1 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in trainingmode module.

---
M web/org.openbravo.retail.trainingmode/js/menu.js
M web/org.openbravo.retail.trainingmode/js/obrtm-utils.js
---
(0086076)
hgbot   
2016-04-29 13:06   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 3ed003876d112c4e588c4b98f8f976217eb39c9f
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:29:32 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/3ed003876d112c4e588c4b98f8f976217eb39c9f [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in sessions module.

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateInfo.js
M web/org.openbravo.retail.sessions/js/components/BusinessDateModel.js
M web/org.openbravo.retail.sessions/js/components/loginhook.js
M web/org.openbravo.retail.sessions/js/countcash/countcash-model.js
M web/org.openbravo.retail.sessions/js/countcash/countcash.js
---
(0086077)
hgbot   
2016-04-29 13:07   
Repository: erp/pmods/org.openbravo.retail.postest
Changeset: 719ebaebf01f53d4ba9a969750c59a6a27fa20bc
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 20 13:30:38 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/719ebaebf01f53d4ba9a969750c59a6a27fa20bc [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary also for the localStorage API in postest module.

---
M web/org.openbravo.retail.postest/source/postest.js
---
(0086087)
hgbot   
2016-04-29 15:32   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3a3ff6280122f4bd0324c7da33e53b7068e20def
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 27 12:57:39 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a3ff6280122f4bd0324c7da33e53b7068e20def [^]

Fixed issue 32582: Stabilization: Create an API for the localStorage

A new file has been cretaed to manage the localstorage.

In this new file, the values of localStorage are set with the name of the
App name.

All related instructions related with this functionality has been change.

---
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M web/org.openbravo.mobile.core/lib/onyx/examples/Browser/App.js
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
M web/org.openbravo.mobile.core/source/component/ob-windowview.js
M web/org.openbravo.mobile.core/source/data/ob-dal.js
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
A web/org.openbravo.mobile.core/source/utils/ob-localStorage.js
---
(0086089)
hgbot   
2016-04-29 15:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6a0ef089e074c2402437d6bbb11573f46c630d01
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 13 10:43:54 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6a0ef089e074c2402437d6bbb11573f46c630d01 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

All related instructions related with this functionality has been change.

---
M web/org.openbravo.retail.posterminal/js/components/modalselectterminal.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0086090)
hgbot   
2016-04-29 15:35   
Repository: tools/automation/pi-mobile
Changeset: 7803f494f4befaea1ebc3a128935b7e4053a247c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 27 16:16:06 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7803f494f4befaea1ebc3a128935b7e4053a247c [^]

Related issue 32582: Stabilization: Create an API for the localStorage

Some changes are necessary in some API from pi-mobile

---
M src-test/org/openbravo/test/mobile/common/selenium/MobileCoreTerminalHelper.java
M src-test/org/openbravo/test/mobile/common/selenium/javascript/APIs/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/TerminalAuthenticationPopupIsShown.java
---
(0086091)
hgbot   
2016-04-29 15:35   
Repository: tools/automation/pi-mobile
Changeset: 46c3b1ed6bf057127fec22a26eca246e8754163e
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 13 10:59:00 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/46c3b1ed6bf057127fec22a26eca246e8754163e [^]

Verifies issue 32582: Stabilization: Create an API for the localStorage

Added test VerifyLocalStorageAPI

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/initialchecks/VerifyLocalStorageAPI.java
---
(0086367)
hgbot   
2016-05-11 10:21   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6956804ea9c51d8343bb21d437277e594532f9c8
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed May 11 10:18:19 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6956804ea9c51d8343bb21d437277e594532f9c8 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Missing a localStorage change in ob-requestrouter

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0086874)
dmitry_mezentsev   
2016-06-01 10:27   
Not closed for 33 days!!!
Please react ASAP.
(0086943)
marvintm   
2016-06-02 16:04   
The new API itself is fine. However, there are several cases in the modules in which the API is being used by doing:

window.OB.UTIL.localStorage

instead of doing:

OB.UTIL.localStorage

This is not nice from a style point of view, and as people will most likely copy/paste from our code, it's important to call the new API properly.
(0087719)
hgbot   
2016-06-21 12:50   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 052bd97e68d72712a57186c8ab37b8e90b7e8f82
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jun 02 17:16:07 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/052bd97e68d72712a57186c8ab37b8e90b7e8f82 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Remove reference to window object in the API calls.

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateInfo.js
M web/org.openbravo.retail.sessions/js/components/BusinessDateModel.js
M web/org.openbravo.retail.sessions/js/components/loginhook.js
M web/org.openbravo.retail.sessions/js/countcash/countcash-model.js
M web/org.openbravo.retail.sessions/js/countcash/countcash.js
---
(0087720)
hgbot   
2016-06-21 12:50   
Repository: erp/pmods/org.openbravo.retail.postest
Changeset: 9b1cf4cbaf9d68c2895cecb84d45bfedbf76c9f8
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jun 02 17:16:31 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/9b1cf4cbaf9d68c2895cecb84d45bfedbf76c9f8 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Remove reference to window object in the API calls.

---
M web/org.openbravo.retail.postest/source/postest.js
---
(0087721)
hgbot   
2016-06-21 12:51   
Repository: erp/pmods/org.openbravo.retail.trainingmode
Changeset: 7f6c964234ca11acf6a390b19723158395d4c717
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jun 02 17:16:18 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.trainingmode/rev/7f6c964234ca11acf6a390b19723158395d4c717 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Remove reference to window object in the API calls.

---
M web/org.openbravo.retail.trainingmode/js/menu.js
M web/org.openbravo.retail.trainingmode/js/obrtm-utils.js
---
(0087867)
hgbot   
2016-06-24 08:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1dbf24edc69b8e2f47ce989b05540f65ee6f1243
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jun 02 17:15:53 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1dbf24edc69b8e2f47ce989b05540f65ee6f1243 [^]

Related to issue 32582: Stabilization: Create an API for the localStorage

Remove reference to window object in the API calls.

---
M web/org.openbravo.retail.posterminal/js/components/modalselectterminal.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0087868)
hgbot   
2016-06-24 08:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e8271ef6d397765cea6aeab3639506edac7a625d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jun 23 17:19:43 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e8271ef6d397765cea6aeab3639506edac7a625d [^]

Fixed issue 32582: Stabilization: Create an API for the localStorage

Remove reference to window object in the API calls.

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
M web/org.openbravo.mobile.core/source/component/ob-windowview.js
M web/org.openbravo.mobile.core/source/data/ob-dal.js
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---