Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0048939 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | have not tried | 2022-03-31 11:21 | 2022-04-17 21:15 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | meriem_azaf | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR22Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0048939: Masterdata model that use extensions should take them into account when calculating the hash | |||||||
Description | Masterdata model definition in the backend includes the list of properties that should be taken into account to calculate a hash. That hash will then be used to determine when those properties have changed, in order to force a full refresh. Currently there are two methods that return the list of fields to take into account for the hash: - one that accepts the list of ModelExtension [1] and that returns the list of all properties included in those extensions - another one that accepts an entity [2] and that returns all the properties of the given entity The second one SHOULD NEVER be used in a master data model that uses ModelExtension, because if a new extension is included, or a new property in an existing extension is included, the new properties will not be included in the hash, and the full master data refresh that should take place will not happen. [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/src/org/openbravo/mobile/core/master/MasterDataProcessHQLQuery.java#L102 [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/src/org/openbravo/mobile/core/master/MasterDataProcessHQLQuery.java#L118 [^] | |||||||
Steps To Reproduce | One one hand, this is straightforward to see. Check what master data model are invoking this function and realize that all of them are using ModelExtension to build the HQL query. To reproduce it: - Start WebPOS and log in. - Stop tomcat, add a any property to TaxCategoryProperties that adds a new property from a separate entity, i.e.: list.add(new HQLProperty("organization.name", "orgName")); - Build the application - Restart tomcat - Log in again in WebPOS, no full refresh is done, this is wrong [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/src/org/openbravo/mobile/core/master/MasterDataProcessHQLQuery.java#L118 [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0136436) hgbot (developer) 2022-04-08 11:25 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/768 [^] |
(0136539) hgbot (developer) 2022-04-17 21:15 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/768 [^] |
(0136540) hgbot (developer) 2022-04-17 21:15 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: a1d984ee41c366830023a52597ba0d6400f6ed5f Author: Meriem Azaf <meriem.azaf@openbravo.com> Date: 08-04-2022 11:24:51 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/a1d984ee41c366830023a52597ba0d6400f6ed5f [^] Fixes ISSUE-48939: Masterdata model that use extensions should take them into account when calculating the hash Masterdata model definition in the backend includes the list of properties that should be taken into account to calculate a hash. That hash will then be used to determine when those properties have changed, in order to force a full refresh. Currently there are two methods that return the list of fields to take into account for the hash: getPropertiesFrom - one that accepts the list of ModelExtension and that returns the list of all properties included in those extensions - another one that accepts an entity and that returns all the properties of the given entity The second one SHOULD NEVER be used in a master data model that uses ModelExtension, because if a new extension is included, or a new property in an existing extension is included, the new properties will not be included in the hash, and the full master data refresh that should take place will not happen. To fix this, we search where the second method used and check if this module use the ModelExtension and after do the change. --- M src/org/openbravo/retail/posterminal/master/Discount.java M src/org/openbravo/retail/posterminal/master/ProductServiceLinked.java M src/org/openbravo/retail/posterminal/master/TaxCategory.java M src/org/openbravo/retail/posterminal/master/TaxCategoryBOM.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2022-03-31 11:21 | AugustoMauch | New Issue | |
2022-03-31 11:21 | AugustoMauch | Assigned To | => Triage Platform Base |
2022-03-31 11:21 | AugustoMauch | OBNetwork customer | => No |
2022-03-31 11:21 | AugustoMauch | Triggers an Emergency Pack | => No |
2022-03-31 11:21 | AugustoMauch | Relationship added | related to 0048884 |
2022-04-06 16:03 | AugustoMauch | Assigned To | Triage Platform Base => meriem_azaf |
2022-04-06 16:03 | AugustoMauch | Status | new => scheduled |
2022-04-08 11:25 | hgbot | Merge Request Status | => open |
2022-04-08 11:25 | hgbot | Note Added: 0136436 | |
2022-04-17 21:13 | hgbot | Merge Request Status | open => approved |
2022-04-17 21:15 | hgbot | Note Added: 0136539 | |
2022-04-17 21:15 | hgbot | Resolution | open => fixed |
2022-04-17 21:15 | hgbot | Status | scheduled => closed |
2022-04-17 21:15 | hgbot | Fixed in Version | => RR22Q3 |
2022-04-17 21:15 | hgbot | Note Added: 0136540 |
Copyright © 2000 - 2009 MantisBT Group |