Openbravo Issue Tracking System - Retail Modules | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0039462 | Retail Modules | Web POS | public | 2018-07-20 12:46 | 2018-10-18 13:05 | |||||||
| Reporter | migueldejuana | |||||||||||
| Assigned To | migueldejuana | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | ||||||||||||
| Target Version | RR18Q2.4 | Fixed in Version | RR18Q2.4 | |||||||||
| Merge Request Status | ||||||||||||
| Review Assigned To | marvintm | |||||||||||
| OBNetwork customer | No | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0039462: Do not set terminalName with empty value | |||||||||||
| Description | Since 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 Reproduce | Put 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 Solution | Change 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")); | |||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| 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 | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/196db31bb02f702c89cbca0778f4f6edd04f1684 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/52cdba1acbb71c362cf34eaf4f975f7e0d00ba03 [^] | |||||||||
| 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 | http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.mobile.core/rev/52cdba1acbb71c362cf34eaf4f975f7e0d00ba03 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.4/org.openbravo.retail.posterminal/rev/d00466c4832ea47c4a4373dd9193e2d683b594fa [^] | |||||||||
| 2018-10-18 13:05 | marvintm | Status | resolved => closed | |||||||||
| 2018-10-18 13:05 | marvintm | Fixed in Version | => RR18Q2.4 | |||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||