Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039009
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminoralways2018-07-20 12:462018-10-16 16:29
ReportermigueldejuanaView Statuspublic 
Assigned Tomigueldejuana 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision196db31bb02f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039009: Do not set terminalName with empty value

DescriptionSince we added localStorage API, we save items in localStorage with the appName as prefix (WEBPOS.terminalName).
There is a case where we try to getItem but appName is not yet defined in OB.MobileApp.model, so we cannot get it from localStorage and we get null value.
Steps To ReproducePut a breakpoint in login-model.js in the line:

      me.setTerminalName(OB.UTIL.localStorage.getItem('terminalAuthentication', me.get('appName')) === 'Y' ? OB.UTIL.localStorage.getItem('terminalName', me.get('appName')) : OB.UTIL.getParameterByName("terminal"));

just before the line:

      OB.UTIL.HookManager.registerHook('OBMOBC_InitActions', function (args, c) {

Load web Pos and see that:

- OB.MobileApp.model is undefined so we cannot get the appName
- OB.UTIL.localStorage.getItem('terminalAuthentication') is null
- OB.UTIL.localStorage.getItem('terminalName')
Proposed SolutionChange the localStorage API adding the ability pass the appName. After this fix, we will be able to load items from localStorage before appName is defined in OB.MobileApp.model.

Example:
      me.setTerminalName(OB.UTIL.localStorage.getItem('terminalAuthentication', me.get('appName')) === 'Y' ? OB.UTIL.localStorage.getItem('terminalName', me.get('appName')) : OB.UTIL.getParameterByName("terminal"));

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0039010 closedmigueldejuana Delete cache deletion revision 
depends on backport 0039428RR18Q3.2 closedmigueldejuana Do not set terminalName with empty value 
depends on backport 0039462RR18Q2.4 closedmigueldejuana Do not set terminalName with empty value 
caused by feature request 0032582 closedjorge-garcia Stabilization: Create an API for the localStorage 

-  Notes
(0105836)
hgbot (developer)
2018-07-20 12:55

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e285e1acb64c88355eabf1ef3ad4c47af9475207
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Jul 20 12:55:22 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e285e1acb64c88355eabf1ef3ad4c47af9475207 [^]

Fixed issue 0039009: Do not set terminalName with empty value

- Add the ability to pass appName in case OB.MobileApp.model is not defined yet

---
M web/org.openbravo.mobile.core/source/utils/ob-localStorage.js
---
(0105837)
hgbot (developer)
2018-07-20 12:59

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 196db31bb02f702c89cbca0778f4f6edd04f1684
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Jul 20 12:59:25 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/196db31bb02f702c89cbca0778f4f6edd04f1684 [^]

Fixed issue 0039009: Do not set terminalName with empty value

- At this point OB.MobileApp.model is not defined so we cannot get appName to get items from localStorage. All localStoragegetItem will return null because this problem(until OB.MobileApp.model is defined) As we already know the appName, pass it as parameter to loscalStorage API.

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---

- Issue History
Date Modified Username Field Change
2018-07-20 12:46 migueldejuana New Issue
2018-07-20 12:46 migueldejuana Assigned To => migueldejuana
2018-07-20 12:46 migueldejuana Triggers an Emergency Pack => No
2018-07-20 12:50 migueldejuana Relationship added caused by 0032582
2018-07-20 12:55 hgbot Checkin
2018-07-20 12:55 hgbot Note Added: 0105836
2018-07-20 12:55 hgbot Status new => resolved
2018-07-20 12:55 hgbot Resolution open => fixed
2018-07-20 12:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e285e1acb64c88355eabf1ef3ad4c47af9475207 [^]
2018-07-20 12:59 hgbot Checkin
2018-07-20 12:59 hgbot Note Added: 0105837
2018-07-20 12:59 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e285e1acb64c88355eabf1ef3ad4c47af9475207 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/196db31bb02f702c89cbca0778f4f6edd04f1684 [^]
2018-07-20 14:08 egoitz Relationship added related to 0039010
2018-07-20 14:08 egoitz Issue Monitored: egoitz
2018-07-26 16:30 marvintm Review Assigned To => marvintm
2018-07-26 16:30 marvintm Status resolved => closed
2018-07-26 16:30 marvintm Fixed in Version => RR18Q4
2018-10-09 19:03 marvintm Status closed => new
2018-10-09 19:03 marvintm Resolution fixed => open
2018-10-09 19:03 marvintm Fixed in Version RR18Q4 =>
2018-10-09 19:03 marvintm Status new => scheduled
2018-10-09 19:03 marvintm Status scheduled => resolved
2018-10-09 19:03 marvintm Fixed in Version => RR18Q4
2018-10-09 19:03 marvintm Resolution open => fixed
2018-10-09 19:03 marvintm Status resolved => closed
2018-10-16 16:28 migueldejuana Status closed => new
2018-10-16 16:28 migueldejuana Resolution fixed => open
2018-10-16 16:28 migueldejuana Fixed in Version RR18Q4 =>
2018-10-16 16:28 migueldejuana Status new => scheduled
2018-10-16 16:29 migueldejuana Status scheduled => resolved
2018-10-16 16:29 migueldejuana Resolution open => fixed
2018-10-16 16:29 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker