Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041069Retail ModulesStoreServerpublic2019-06-11 10:512019-06-13 13:57
guillermogil 
mtaal 
highmajoralways
closedfixed 
5
 
 
migueldejuana
No
0041069: SourceCode not updated after a deploy if the StoreServer is offline
SourceCode not updated after a deploy if the StoreServer is offline
- Login on WebPOS
- Logout
- Modify the source Code in central and store
- Compile Central and Store
- Stop central Server
- Login on WebPOS

Do not allow to do anything if the sourcecode is outdated
No tags attached.
related to design defect 0040096 closed migueldejuana Source verson check is not done for store server, add it to the central server login 
causes defect 0041323 closed mtaal Store server source version check not comparable with central server version check 
Issue History
2019-06-11 10:51guillermogilNew Issue
2019-06-11 10:51guillermogilAssigned To => StoreServer
2019-06-11 10:51guillermogilTriggers an Emergency Pack => No
2019-06-12 15:57mtaalAssigned ToStoreServer => mtaal
2019-06-12 23:04mtaalRelationship addedrelated to 0040096
2019-06-13 09:39hgbotCheckin
2019-06-13 09:39hgbotNote Added: 0112764
2019-06-13 09:39hgbotStatusnew => resolved
2019-06-13 09:39hgbotResolutionopen => fixed
2019-06-13 09:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1f97bb820e0b47793b660db9a757b7b724dddedb [^]
2019-06-13 09:45mtaalNote Added: 0112765
2019-06-13 13:57migueldejuanaReview Assigned To => migueldejuana
2019-06-13 13:57migueldejuanaNote Added: 0112769
2019-06-13 13:57migueldejuanaStatusresolved => closed
2019-06-14 10:24mtaalNote Edited: 0112765bug_revision_view_page.php?bugnote_id=0112765#r18922
2019-06-14 10:27mtaalNote Edited: 0112765bug_revision_view_page.php?bugnote_id=0112765#r18923
2019-07-09 15:57mtaalRelationship addedcauses 0041323

Notes
(0112764)
hgbot   
2019-06-13 09:39   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1f97bb820e0b47793b660db9a757b7b724dddedb
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 13 09:38:49 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1f97bb820e0b47793b660db9a757b7b724dddedb [^]

Fixes issue 41069: SourceCode not updated after a deploy if the StoreServer is offline
Send the source version in a separate property when store server is offline. On the client
use the property to compare against the sourceversion without updating the sourceversion
in the client.

---
M src/org/openbravo/mobile/core/process/JSONProcessSimple.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
---
(0112765)
mtaal   
2019-06-13 09:45   
(edited on: 2019-06-14 10:27)
To test:
- install multi-server
- run the browser on central url using ss also
- check that the sourceversion is set in the client
execute this in the client side chrome console:
OB.UTIL.localStorage.getItem('SourceVersion_' + OB.MobileApp.model.get('appName'))

- change the source version in the client manually through the console
In the client side console do:
OB.UTIL.localStorage.setItem('SourceVersion_' + OB.MobileApp.model.get('appName'), 'ABC')

- refresh: notice that a popup occurs and that the source version gets reset back (as cs is still there)

- stop the central server and stop the store server
- make a change in a javascript file on the store server
e.g. add this line:
if (true) {
console.log('test');
}
in the ob-requestrouter.js file.
Note: on an aws server this must be done in the webapps directory of tomcat (or otherwise a rebuild is needed)

- start the store server
- do any action in the client, the system will go offline

- when logging in (or earlier) the system will show a 'source changed popup'

- this popup will occur again when logging in

- restart cs, wait for the ss to go online

- login into webpos, see that the change source popup occurs once

- after logging in it should be fine

- now undo the change in javascript on the store server

- restart the store server

- login/do actions on webpos, should work

- stop central server

- do actions: store server goes offline

- check that in webpos you can do normal offline actions

- start cs again

- check that ss goes online

(0112769)
migueldejuana   
2019-06-13 13:57   
Reviewed