Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0048884 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2022-03-23 19:06 | 2022-04-17 21:24 | |||
Reporter | sofidossant | View Status | public | |||||
Assigned To | meriem_azaf | |||||||
Priority | high | 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 | RR20Q3 | SCM revision | ||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | Gold | |||||||
Support ticket | 39665 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | RR20Q3 | |||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0048884: Full Refresh generated in deploy without changes or model insertion in webPOS | |||||||
Description | If a model has changed, a frontend hash is stored from the list of properties of which the model is a part. In 20Q3, in the case of TaxCategory, in TaxCategory.java (the Taxes query), this was done: @Override public List<String> getMasterDataModelProperties() { return getPropertiesFrom(org.openbravo.model.financialmgmt.tax.TaxCategory.class); } In this function, the properties of the TaxCategory entity are returned. This includes the list-like properties that are generated for the "child" models that are marked with IS_CHILD_PROPERTY_IN_PARENT="Y". When changes are added that are not related to webPOS models, but are children to models that use webPOS, it changes the hash and generates a full refresh on the terminals. This can happen with various models: discount, taxcategory, taxcategorybom, productservicelinked and more. | |||||||
Steps To Reproduce | - Open the terminal. - Create a new child table of TaxCategory. - Deploy. - A full refresh will be generated in the terminal | |||||||
Proposed Solution | Change the following function to ignore child properties protected static List<String> getPropertiesFrom(Class<?> entityClass) { Class MasterDataProcessHQLQuery | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0135986) AugustoMauch (administrator) 2022-03-24 00:23 |
Hello Sofia, I just checked and what you mentioned does not match the code in 20Q3. This [1] is the implementation of TaxRate.getMasterDataModelProperties in 20Q3, and it just lists the properties defined in its ModelExtension. No list properties should be included unless a ModelExtension explicitely includes it. Where did you get the implementation pasted in the description? [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/release/20Q3/src/org/openbravo/retail/posterminal/master/TaxRate.java#L133 [^] |
(0135988) marvintm (viewer) 2022-03-24 07:22 |
Hi Augusto, In fact, there is a mistake in the issue reported, the problem didn't happen with a List property in TaxRate but in TaxCategory instead: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/release/20Q3/src/org/openbravo/retail/posterminal/master/TaxCategory.java#L58 [^] This model (and several others) use a utility method in MasterDataProcessHQLQuery (getPropertiesFrom(Class<?> entityClass). This method returns all the properties of the given entity class, including List properties. This caused an unintended full refresh in a customer yesterday. We can discuss quickly together if some detail is still missing. |
(0136354) hgbot (developer) 2022-04-06 12:46 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/353 [^] |
(0136541) hgbot (developer) 2022-04-17 21:24 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^] Changeset: 9bf6254d9293a9e9307c1aae9a893b22b044545f Author: Meriem Azaf <meriem.azaf@openbravo.com> Date: 17-04-2022 21:24:16 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/9bf6254d9293a9e9307c1aae9a893b22b044545f [^] Fixes ISSUE-48884: Full Refresh generated in deploy without changes or model insertion in webPOS After doing changes in models that are related to webPOS modules, it changes the hash and generates a full refresh on the terminals. To fix this,we add a filter in this function getPropertiesFrom in MasterDataProcessHQLQuery to not get list properties that are represented as OneToMany relation. --- M src/org/openbravo/mobile/core/master/MasterDataProcessHQLQuery.java --- |
(0136542) hgbot (developer) 2022-04-17 21:24 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/353 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2022-03-23 19:06 | sofidossant | New Issue | |
2022-03-23 19:06 | sofidossant | Assigned To | => AugustoMauch |
2022-03-23 19:06 | sofidossant | OBNetwork customer | => Gold |
2022-03-23 19:06 | sofidossant | Support ticket | => 39665 |
2022-03-23 19:06 | sofidossant | Regression introduced in release | => RR20Q3 |
2022-03-23 19:06 | sofidossant | Triggers an Emergency Pack | => No |
2022-03-24 00:23 | AugustoMauch | Note Added: 0135986 | |
2022-03-24 00:23 | AugustoMauch | Assigned To | AugustoMauch => sofidossant |
2022-03-24 00:23 | AugustoMauch | Status | new => feedback |
2022-03-24 07:22 | marvintm | Note Added: 0135988 | |
2022-03-24 11:34 | sofidossant | Status | feedback => new |
2022-03-24 11:34 | sofidossant | Description Updated | View Revisions |
2022-03-24 11:35 | sofidossant | Assigned To | sofidossant => AugustoMauch |
2022-03-31 11:21 | AugustoMauch | Relationship added | related to 0048939 |
2022-03-31 16:46 | AugustoMauch | Assigned To | AugustoMauch => meriem_azaf |
2022-03-31 16:46 | AugustoMauch | Status | new => scheduled |
2022-04-06 12:46 | hgbot | Merge Request Status | => open |
2022-04-06 12:46 | hgbot | Note Added: 0136354 | |
2022-04-17 21:23 | hgbot | Merge Request Status | open => approved |
2022-04-17 21:24 | hgbot | Resolution | open => fixed |
2022-04-17 21:24 | hgbot | Status | scheduled => closed |
2022-04-17 21:24 | hgbot | Fixed in Version | => RR22Q3 |
2022-04-17 21:24 | hgbot | Note Added: 0136541 | |
2022-04-17 21:24 | hgbot | Note Added: 0136542 |
Copyright © 2000 - 2009 MantisBT Group |