Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043167Retail ModulesWeb POSpublic2020-02-10 17:092020-02-13 17:35
gorka_gil 
gorka_gil 
urgentmajoralways
closedfixed 
5
 
RR20Q2 
guilleaer
No
0043167: Dependencies of webpos are cached when it shouldn't
When updating the sources of webpos and updating the dependencies, the dependencies gets cached.

This blocks the update when there are changes in the dependencies.
- In an instance with no module in development (so service workers is enabled)
- access to:
http://localhost/openbravo/org.openbravo.mobile.core/OBMOBC_Main/Lib?_id=Deps [^]

- Then edit the file: LibraryResource.java
- Adding a external lib:
   EXTERNAL_LIBS.add("xxxxxx");
- Restart tomcat (since is not in development)
- Access again to:
http://localhost/openbravo/org.openbravo.mobile.core/OBMOBC_Main/Lib?_id=Deps [^]

Problem: the result cached and is not updated with the new lib, also in developer tools can be seen that the network request is 304 (not modified) instead 200
Change eTag to detect changes
No tags attached.
related to defect 0043163 closed gorka_gil Before update sources the messages should be synchronized 
related to defect 0041860 closed marvintm Etag is not correctly calculated in ClientModel component 
Issue History
2020-02-10 17:09gorka_gilNew Issue
2020-02-10 17:09gorka_gilAssigned To => Retail
2020-02-10 17:09gorka_gilTriggers an Emergency Pack => No
2020-02-10 17:11gorka_gilRelationship addedrelated to 0043163
2020-02-10 17:11gorka_gilRelationship addedrelated to 0041860
2020-02-10 17:11gorka_gilStatusnew => scheduled
2020-02-10 17:11gorka_gilAssigned ToRetail => gorka_gil
2020-02-10 17:13gorka_gilNote Added: 0117608
2020-02-11 11:21hgbotCheckin
2020-02-11 11:21hgbotNote Added: 0117629
2020-02-11 11:21hgbotStatusscheduled => resolved
2020-02-11 11:21hgbotResolutionopen => fixed
2020-02-11 11:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ed4d580e8c9c27d3c855f437414931b55dc1872c [^]
2020-02-13 17:35guilleaerReview Assigned To => guilleaer
2020-02-13 17:35guilleaerStatusresolved => closed
2020-02-13 17:35guilleaerFixed in Version => RR20Q2

Notes
(0117608)
gorka_gil   
2020-02-10 17:13   
The change is needed in the new instance, not in the old one, so this issue is NOT needed to be backported to old releases.
(0117629)
hgbot   
2020-02-11 11:21   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ed4d580e8c9c27d3c855f437414931b55dc1872c
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Mon Feb 10 19:42:19 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ed4d580e8c9c27d3c855f437414931b55dc1872c [^]

Fixes BUG-43167: Fix dependencies doesn't update when it has changes

Changed the eTag of the libraryResources requests,
to instaead use the module version to be always diferent.

This is ok because service workers will cache in in the client,
and will be only requested in the moment the manifiest change
something, and in this case we want to have it always updated.

---
M src/org/openbravo/mobile/core/LibraryResource.java
---