Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032571Retail ModulesWeb POSpublic2016-04-01 13:362016-06-02 18:56
asiermartirena 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR16Q3 
marvintm
No
0032571: [SERQA 867] There is an if condition in mobile core that checks conditions about the logging terminal
There is an if condition in mobile core that checks if the terminal in which is logging (OB.MobileApp.model.get('terminalName')) is different to the terminal stored in the window (window.localStorage.getItem('loggedTerminalName')) and logs out in that case.

This clause is necessary for Web POS, but other applications are not logged to a terminal, so if an user has cached the session and stored the terminal in the localStorage and tries to login to the mobile.warehouse application this condition logs out and the user must login again.
Login in Web POS.
Browse to the following url:

http://localhost:8080/openbravo/web/org.openbravo.mobile.warehouse/ [^]

The web is redirected to login window, and should go to the application, because has a session in cache.
SER-QA
depends on feature request 0032582 closed jorge-garcia Stabilization: Create an API for the localStorage 
Issue History
2016-04-01 13:36asiermartirenaNew Issue
2016-04-01 13:36asiermartirenaAssigned To => Retail
2016-04-01 13:36asiermartirenaTriggers an Emergency Pack => No
2016-04-01 14:01asiermartirenaSummaryThere is an if condition in mobile core that checks conditions about the logging terminal => [SERQA 867] There is an if condition in mobile core that checks conditions about the logging terminal
2016-04-01 14:01asiermartirenaTag Attached: SER-QA
2016-04-04 14:30OrekariaRelationship addeddepends on 0032582
2016-04-04 14:30OrekariaStatusnew => acknowledged
2016-04-04 14:33OrekariaNote Added: 0085416
2016-04-04 14:33OrekariaProposed Solution updated
2016-04-04 14:34OrekariaNote Edited: 0085416bug_revision_view_page.php?bugnote_id=0085416#r11643
2016-04-14 16:03OrekariaStatusacknowledged => scheduled
2016-04-14 16:03OrekariaAssigned ToRetail => jorge-garcia
2016-05-05 09:00hgbotCheckin
2016-05-05 09:00hgbotNote Added: 0086196
2016-05-05 09:04jorge-garciaNote Added: 0086198
2016-05-05 09:04jorge-garciaStatusscheduled => resolved
2016-05-05 09:04jorge-garciaFixed in Version => RR16Q3
2016-05-05 09:04jorge-garciaResolutionopen => fixed
2016-06-01 10:37dmitry_mezentsevNote Added: 0086882
2016-06-02 18:56marvintmReview Assigned To => marvintm
2016-06-02 18:56marvintmStatusresolved => closed

Notes
(0085416)
Orekaria   
2016-04-04 14:33   
(edited on: 2016-04-04 14:34)
We will fix it creating a localStorage API. See related issue

The proposed solution has been removed, not to cause missunderstandings:

Move the following code from mobile.core to retail.posterminal:

// check if terminal id has changed
if (window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') !== OB.MobileApp.model.get('terminalName'))) {
  console.warn(OB.UTIL.argumentsToStringifyed("terminal changed (" + window.localStorage.getItem('loggedTerminalName') + " -> " + OB.MobileApp.model.get('terminalName') + ")"));
  OB.info('Terminal has been changed. Resetting database and local storage information.');
  window.localStorage.clear();
  window.localStorage.setItem('terminalName', OB.MobileApp.model.get('terminalName'));
  OB.MobileApp.model.logout();
  return;
}

(0086196)
hgbot   
2016-05-05 09:00   
Repository: tools/automation/pi-mobile
Changeset: 4ac8d6b5891848fb346da6ca710b0df0b3df6dab
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed May 04 15:17:31 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/4ac8d6b5891848fb346da6ca710b0df0b3df6dab [^]

Verifies issue 32571: [SERQA 867] There is an if condition in mobile core that
checks conditions about the logging terminal

Added test I32571_NavigateFromPOSToProcurementDirectly.

---
M src-test/org/openbravo/test/mobile/common/selenium/utils/ApplicationWindow.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/procurement/I32571_NavigateFromPOSToProcurementDirectly.java
---
(0086198)
jorge-garcia   
2016-05-05 09:04   
Fixed by these commits:

http://code.openbravo.com/erp/pmods/org.openbravo.retail.trainingmode/rev/a252dfe602c65fb3bd456270cd07c72b51aa67d1 [^] -> TrainingMode module

http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/3ed003876d112c4e588c4b98f8f976217eb39c9f [^] --> Sessions Module

http://code.openbravo.com/erp/pmods/org.openbravo.retail.postest/rev/719ebaebf01f53d4ba9a969750c59a6a27fa20bc [^] --> Postest module

http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3a3ff6280122f4bd0324c7da33e53b7068e20def [^] --> Mobile Core module

http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6a0ef089e074c2402437d6bbb11573f46c630d01 [^] --> POSTerminal module
(0086882)
dmitry_mezentsev   
2016-06-01 10:37   
Not closed for 27 days!!!
Please react ASAP.