Openbravo Issue Tracking System - Retail Modules
View Issue Details
0029342Retail ModulesWeb POSpublic2015-03-18 18:502015-03-27 17:18
Orekaria 
Orekaria 
normalmajoralways
closedfixed 
5
 
RR15Q2 
marvintm
No
0029342: Stabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing the terminal data
Stabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing the terminal data
Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false" and the condition is true


2)
Log in with Vallblanca
Set a breakpoint in 'ob-profile.js' in the line of this code:
  window.localStorage.removeItem('cacheAvailableForUser:' + OB.MobileApp.model.get('context').user.name);

Verify that the content of OB.MobileApp.model.user is 'vallblanca' (CORRECT)
Verify that the content of OB.MobileApp.model.get('context').user.name is not 'vallblanca' (INCORRECT)
No tags attached.
depends on feature request 0028933RR16Q1 closed Retail QA: RR15Q2: Add tests for Mobile applications 
blocks defect 0029352 closed Orekaria Stabilization: For internal user tracking, the user id should be used instead of the user name 
blocks feature request 0029377RR15Q3 closed Orekaria Stabilization: RR15Q2 related 
patch RR15Q1.core.patch (1,297) 2015-03-19 12:18
https://issues.openbravo.com/file_download.php?file_id=7903&type=bug
Issue History
2015-03-18 18:50OrekariaNew Issue
2015-03-18 18:50OrekariaAssigned To => Retail
2015-03-18 18:50OrekariaTriggers an Emergency Pack => No
2015-03-18 18:51OrekariaAssigned ToRetail => Orekaria
2015-03-18 18:51OrekariaRelationship addeddepends on 0028933
2015-03-18 18:53OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8030#r8030
2015-03-18 18:53OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8031#r8031
2015-03-18 19:29OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8032#r8032
2015-03-18 19:29OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8033#r8033
2015-03-18 19:52OrekariaSummaryStabilization: The 'cacheAvailableForUser' localStorage value is inconsistent in its use => Stabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing data
2015-03-18 19:52OrekariaDescription Updatedbug_revision_view_page.php?rev_id=8035#r8035
2015-03-18 20:11OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8036#r8036
2015-03-18 20:23hgbotCheckin
2015-03-18 20:23hgbotNote Added: 0075759
2015-03-18 20:23hgbotStatusnew => resolved
2015-03-18 20:23hgbotResolutionopen => fixed
2015-03-18 20:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4e33cba722dfae09f5fcc4f0085a425afa2e1861 [^]
2015-03-18 21:12hgbotCheckin
2015-03-18 21:12hgbotNote Added: 0075760
2015-03-18 21:12hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4e33cba722dfae09f5fcc4f0085a425afa2e1861 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff50f93c2d838cea1145c7c4b669548acd25d713 [^]
2015-03-18 21:24hgbotCheckin
2015-03-18 21:24hgbotNote Added: 0075761
2015-03-18 21:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff50f93c2d838cea1145c7c4b669548acd25d713 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/316c5ea2233bbf0580a95f2cbe33ad9e951d170d [^]
2015-03-19 07:37OrekariaStatusresolved => new
2015-03-19 07:37OrekariaResolutionfixed => open
2015-03-19 07:37OrekariaStatusnew => scheduled
2015-03-19 07:38OrekariaStatusscheduled => resolved
2015-03-19 07:38OrekariaFixed in Version => RR15Q2
2015-03-19 07:38OrekariaResolutionopen => fixed
2015-03-19 08:25OrekariaSummaryStabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing data => Stabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing the terminal data
2015-03-19 08:25OrekariaDescription Updatedbug_revision_view_page.php?rev_id=8037#r8037
2015-03-19 12:18OrekariaFile Added: RR15Q1.core.patch
2015-03-19 12:21OrekariaNote Edited: 0075761bug_revision_view_page.php?bugnote_id=0075761#r8041
2015-03-19 21:15OrekariaRelationship addedblocks 0029352
2015-03-23 14:54OrekariaRelationship addedblocks 0029377
2015-03-27 17:18marvintmReview Assigned To => marvintm
2015-03-27 17:18marvintmStatusresolved => closed

Notes
(0075759)
hgbot   
2015-03-18 20:23   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4e33cba722dfae09f5fcc4f0085a425afa2e1861
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Mar 18 20:23:14 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4e33cba722dfae09f5fcc4f0085a425afa2e1861 [^]

Fixes issue 29342: 'cacheAvailableForUser' has been normalized and missing cache data will properly force non-cache load

The value is removed from the localStorage when it is not used instead of being denied
The 'OB.MobileApp.model.user' value has been used all across the board
When the 'processPropertyLoaders' raise an error because there is not enough cache data, the next WebPOS load will not use cache

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0075760)
hgbot   
2015-03-18 21:12   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ff50f93c2d838cea1145c7c4b669548acd25d713
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Mar 18 21:11:54 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff50f93c2d838cea1145c7c4b669548acd25d713 [^]

Fixes issue 29342: The OB namespace will be remembered before the 'eval(inResponse)'

The problem is that the OB namespace is replaced when the 'eval(inResponse)' is executed
A variable is created to remember the application value
More comments have been added to prevent developers

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0075761)
hgbot   
2015-03-18 21:24   
(edited on: 2015-03-19 12:21)
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 316c5ea2233bbf0580a95f2cbe33ad9e951d170d
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Mar 18 21:24:10 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/316c5ea2233bbf0580a95f2cbe33ad9e951d170d [^]

Fixes issue 29342: Verify that the value to check if there is cache available is "true" instead of 'something'

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---