Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027688Retail ModulesOffline Modepublic2014-09-25 16:102014-10-10 10:55
plujan 
marvintm 
normalmajorhave not tried
closedfixed 
5
 
RR15Q1 
migueldejuana
No
0027688: Offline mode does not detect signal is back if no session was created in the Backend
While working in Offline mode, application behaviour is not the same if the login was made online or offline. If offline at login time, the session is not created in the Backend, so whenever online ability is detected it should take the user to login page. This does not happen though.
1. Test the online login first. With a proper Internet connectivity, login in the frontend.
2. Disconnect the computer from the Internet
3. Create an order. Check that since it is offline, there will be no "Order XXX has ben closed" success message. Check that the order has not being created in the backend neither.
4. Reconnect the Internet
5. Create a second order. Now it should detect the online ability and show a message "All pending orders have been processed". Check that this order and the previous one were synchronised to the server.
6. Logout
7. Disconnect the Internet for checking the login from offline mode.
8. Logging in and creating orders should be not different from the first steps.
9. Reconnect the Internet.
10. Create another order. Expected behaviour is to get the online mode detected but since there was not a previous session created, a message asking by a new login should be shown. However, this does not happen and the frontend keeps working on offline mode.
No tags attached.
Issue History
2014-09-25 16:10plujanNew Issue
2014-09-25 16:10plujanAssigned To => marvintm
2014-09-25 16:10plujanTriggers an Emergency Pack => No
2014-10-07 13:19marvintmNote Added: 0070767
2014-10-07 17:13hgbotCheckin
2014-10-07 17:13hgbotNote Added: 0070779
2014-10-07 17:13hgbotStatusnew => resolved
2014-10-07 17:13hgbotResolutionopen => fixed
2014-10-07 17:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ebfdefb948d232898806827fd601ffef2aa02c77 [^]
2014-10-10 10:55migueldejuanaReview Assigned To => migueldejuana
2014-10-10 10:55migueldejuanaNote Added: 0070862
2014-10-10 10:55migueldejuanaStatusresolved => closed
2014-10-10 10:55migueldejuanaFixed in Version => RR15Q1

Notes
(0070767)
marvintm   
2014-10-07 13:19   
Apart from the case described, there is also a minor issue related to this problem. If you log in online, and then you lose the session (for example, due to a server restart), the system will not notice the next request that the server has come back but you need to log in again.

Instead, it will take up to one minute to notice, and then the popup prompting to log in again will be shown.

The change we are going to do will solve both issues: in case you logged online, the system will notice immediately after a request that the user needs to log in again. In case you logged offline, it will also notice immediately after any operation which attempts to do a request to the server that a login is required.
(0070779)
hgbot   
2014-10-07 17:13   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ebfdefb948d232898806827fd601ffef2aa02c77
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Oct 07 17:13:02 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ebfdefb948d232898806827fd601ffef2aa02c77 [^]

Fixed issue 27688. Now triggerOffline will immediately check connectivity status.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0070862)
migueldejuana   
2014-10-10 10:55   
Tested and reviewed in 9f470354180c