Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028251Retail ModulesWeb POSpublic2014-11-21 17:042014-11-30 20:00
marvintm 
marvintm 
normalminoralways
closedfixed 
5
 
RR15Q1RR15Q1 
mtaal
No
0028251: Improved behavior of the Web POS update in case the user doesn't manually refresh the page after the update is done
Currently, if an update of the Web POS application is done in the backend, the client side will correctly detect it when the browser page is either accessed directly, or refreshed (F5). In this case, the application cache will be correctly reloaded, and the page will be reloaded again to ensure that the newest sources are used.

However, in the case the page was already open and the user just starts using it, the update will not be detected, so the application will be running with the old source code. This is specially troublesome in the case of users which leave the computer running over the night, and the next morning find the Web POS already open in the login page, because it is very unlikely that they will remember to refresh the page just in case there was an update.

Therefore, this situation must also be specifically handled by the mobile infrastructure to ensure that even in this case, the Web POS sources are reloaded, and the new version is used.
- Login in the Web POS.
- Log out of the Web POS. Leave the browser open in the login page.
- Update the Web POS (either by updating one of the retail modules, rebuilding the system, and restarting tomcat, or by changing something in the Javascript code and then deleting the static resource file).
- Login in the Web POS again. Verify that you are using the old sources.
- Refresh the page. You will now notice that the new sources are used.
No tags attached.
related to defect 0028059RR15Q1 closed marvintm WebPos Update Improvement Process 
causes defect 0028324RR15Q1 closed mtaal Source change detection breaks build, non-thread safe handling of js code generation 
causes defect 0029866 new Retail A 'OBMOBCR' suffixed javascript file is being generated 
png Selection_158.png (214,669) 2014-11-30 19:50
https://issues.openbravo.com/file_download.php?file_id=7561&type=bug
png
Issue History
2014-11-21 17:04marvintmNew Issue
2014-11-21 17:04marvintmAssigned To => marvintm
2014-11-21 17:04marvintmTriggers an Emergency Pack => No
2014-11-21 17:09hgbotCheckin
2014-11-21 17:09hgbotNote Added: 0071898
2014-11-21 17:09hgbotStatusnew => resolved
2014-11-21 17:09hgbotResolutionopen => fixed
2014-11-21 17:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fed15c71d6e969d3a6ca875670269e8d8530daaf [^]
2014-11-30 19:50mtaalFile Added: Selection_158.png
2014-11-30 19:59mtaalNote Added: 0072163
2014-11-30 20:00mtaalRelationship addedcauses 0028324
2014-11-30 20:00mtaalReview Assigned To => mtaal
2014-11-30 20:00mtaalNote Added: 0072164
2014-11-30 20:00mtaalStatusresolved => closed
2014-11-30 20:00mtaalFixed in Version => RR15Q1
2014-12-08 11:49mtaalRelationship addedrelated to 0028059
2015-05-13 13:53OrekariaRelationship addedcauses 0029866

Notes
(0071898)
hgbot   
2014-11-21 17:09   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fed15c71d6e969d3a6ca875670269e8d8530daaf
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Nov 21 17:08:34 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fed15c71d6e969d3a6ca875670269e8d8530daaf [^]

Fixed issue 28251. Source version will be checked in requests to the datasource API and in the login.
- Requests to the datasource will always return the source version. This will be checked against the version saved in the local storage. If they are different, a popup will be shown to the user, and this popup will reload the page.
- Requests to the LoginHandler will also return the source version. Again, this will be checked against the version saved in the local storage. If they are different, the page will be automatically reloaded to ensure that the user starts working with the lastest version of the sources.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/mobile/core/MobileStaticResourceComponent.java
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
M src/org/openbravo/mobile/core/process/JSONProcessSimple.java
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0072163)
mtaal   
2014-11-30 19:59   
Added docs: http://wiki.openbravo.com/wiki/Retail:Web_POS_User_Guide#Web_POS_Updates [^]
(0072164)
mtaal   
2014-11-30 20:00   
Reviewed and tested, see related issue for conclusions