Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSminoralways2018-07-20 12:462018-10-18 13:05
ReportermigueldejuanaView Statuspublic 
Assigned Tomigueldejuana 
PrioritynormalResolutionfixedFixed in VersionRR18Q2.4
StatusclosedFix in branchFixed in SCM revisiond00466c4832e
ProjectionnoneETAnoneTarget VersionRR18Q2.4
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

0039462: 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.

      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 ]
blocks defect 0039009 closedmigueldejuana Do not set terminalName with empty value 

-  Notes
hgbot (developer)
2018-10-16 16:30

Repository: retail/backports/3.0RR18Q2.4/
Changeset: 52cdba1acbb71c362cf34eaf4f975f7e0d00ba03
Author: Miguel de Juana <miguel.dejuana <at>>
Date: Tue Oct 16 16:30:35 2018 +0200
URL: [^]

Fixed issue 0039462: Do not set terminalName with empty value

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

M web/
hgbot (developer)
2018-10-16 16:31

Repository: retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal
Changeset: d00466c4832ea47c4a4373dd9193e2d683b594fa
Author: Miguel de Juana <miguel.dejuana <at>>
Date: Tue Oct 16 16:30:06 2018 +0200
URL: [^]

Fixed issue 0039462: 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-10-16 16:28 migueldejuana Type defect => backport
2018-10-16 16:28 migueldejuana Target Version => RR18Q2.4
2018-10-16 16:30 hgbot Checkin
2018-10-16 16:30 hgbot Note Added: 0107343
2018-10-16 16:30 hgbot Status scheduled => resolved
2018-10-16 16:30 hgbot Resolution open => fixed
2018-10-16 16:30 hgbot Fixed in SCM revision [^] => [^]
2018-10-16 16:31 hgbot Checkin
2018-10-16 16:31 hgbot Note Added: 0107344
2018-10-16 16:31 hgbot Fixed in SCM revision [^] => [^]
2018-10-18 13:05 marvintm Status resolved => closed
2018-10-18 13:05 marvintm Fixed in Version => RR18Q2.4

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker