Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0034470 | Openbravo ERP | A. Platform | public | 2016-11-11 10:56 | 2022-02-01 08:05 | |||||||
Reporter | NaroaIriarte | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||||
Status | acknowledged | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0034470: The manage variants filter is not working fine in some circumstances. | |||||||||||
Description | If there is a criteria which has two levels of deep and in the second level there are two criterias, filters cannot handle it and do not work properly. Criterias of this kind: criteria:{"fieldName":"id","operator":"equals","value":"A"} criteria:{"operator":"and","_constructor":"AdvancedCriteria","criteria":[{"fieldName":"searchKey","operator":"iContains","value":"B"},{"fieldName":"name","operator":"iContains","value":"C"}]} The problem is in the "ManageVariantsDS" manual datasource. The way of handling the criterias is not correct. | |||||||||||
Steps To Reproduce | 1- Log in the erp as F&B Admin. 2- Go to "Produc Characteristic" window and create a new product characteristic. 3- Mark the product characteristic as variant and add some values to it. 4- Go to "Product" window and create a new product. 5- Check the "Is Generic" chackbox. 6- Go to the "Characteristic" subtab and add the previously created charaacteristic. 7- Mark it as variant. 8- Run the "Generate Variants" process. 9- Click on the "Manage Variants" process. 10- Select the first record by clicking the checkbox. 11- Filter by another record, for example if the record clicked is "Test1" filter by another record, for example "Test2". Realize that the two records are shown. This is correct. 12- Go to another filter and filter by something which has no sense to try to not get any record. For example in the name filter write: asdas. 13- Realize that the two records filtered before are still shown. this is not correct, the correct result will be not having any record in the grid. | |||||||||||
Proposed Solution | Change the "ManageVariantsDS.readCriteria" method and make it capable to handle these cases of criteria. Code to be changed: if (criteria.has("_constructor") && "AdvancedCriteria".equals(criteria.getString("_constructor")) && criteria.has("criteria")) { JSONArray innerCriteriaArray = new JSONArray(criteria.getString("criteria")); criteria = innerCriteriaArray.getJSONObject(0); } | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-11-11 10:56 | NaroaIriarte | New Issue | ||||||||||
2016-11-11 10:56 | NaroaIriarte | Assigned To | => platform | |||||||||
2016-11-11 10:56 | NaroaIriarte | Modules | => Core | |||||||||
2016-11-11 10:56 | NaroaIriarte | Triggers an Emergency Pack | => No | |||||||||
2016-11-11 10:56 | NaroaIriarte | Relationship added | related to 0034405 | |||||||||
2016-12-01 13:11 | alostale | Status | new => acknowledged | |||||||||
2022-02-01 08:05 | alostale | Assigned To | platform => Triage Platform Base |
There are no notes attached to this issue. |