Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034708Retail ModulesStoreServerpublic2016-12-08 08:342016-12-14 17:35
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR17Q1 
AugustoMauch
No
No
0034708: Server State Background: prevent update of server state if it hasn't changed
The server state background process updates the state of a server [1]. It always calls the save method [2] eventhough the state might not have changed.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/4b9f3131a589/src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/4b9f3131a589/src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java#l140 [^]
See description
Only set the state and save if it is different from the current state
No tags attached.
Issue History
2016-12-08 08:34mtaalNew Issue
2016-12-08 08:34mtaalAssigned To => mtaal
2016-12-08 08:34mtaalOBNetwork customer => No
2016-12-08 08:34mtaalTriggers an Emergency Pack => No
2016-12-08 08:34mtaalReview Assigned To => AugustoMauch
2016-12-08 08:36hgbotCheckin
2016-12-08 08:36hgbotNote Added: 0092209
2016-12-08 08:36hgbotStatusnew => resolved
2016-12-08 08:36hgbotResolutionopen => fixed
2016-12-08 08:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d6bb0c452dd557fda12c9aa874e2be1fea7cce31 [^]
2016-12-10 18:59AugustoMauchNote Added: 0092265
2016-12-10 18:59AugustoMauchStatusresolved => new
2016-12-10 18:59AugustoMauchResolutionfixed => open
2016-12-11 08:23hgbotCheckin
2016-12-11 08:23hgbotNote Added: 0092268
2016-12-11 08:23hgbotStatusnew => resolved
2016-12-11 08:23hgbotResolutionopen => fixed
2016-12-11 08:23hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d6bb0c452dd557fda12c9aa874e2be1fea7cce31 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8d9e9bf223ae1ab9becf210db886960e04958f32 [^]
2016-12-14 17:35AugustoMauchNote Added: 0092373
2016-12-14 17:35AugustoMauchStatusresolved => closed

Notes
(0092209)
hgbot   
2016-12-08 08:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d6bb0c452dd557fda12c9aa874e2be1fea7cce31
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Dec 08 08:35:22 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d6bb0c452dd557fda12c9aa874e2be1fea7cce31 [^]

Fixes issue 34708: Server State Background: prevent update of server state if it hasn't changed
Set the state and save only if the server status has changed

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0092265)
AugustoMauch   
2016-12-10 18:59   
In this line [1], the status of the server is being compared with MobileServerState.OFFLINE to check if the server is offline, using the srv.getStatus() method. This used to be done after updating the status, but now the status has not been updated yet.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/d6bb0c452dd5/src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java#l141 [^]
(0092268)
hgbot   
2016-12-11 08:23   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8d9e9bf223ae1ab9becf210db886960e04958f32
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Dec 11 08:23:13 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8d9e9bf223ae1ab9becf210db886960e04958f32 [^]

Fixes issue 34708: Server State Background: prevent update of server state if it hasn't changed
Check the newStatus instead of value in mobile server definition record.

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0092373)
AugustoMauch   
2016-12-14 17:35   
Code reviewed and verified