Project: 	
  | View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | |||||||||||
| 0034470 | |||||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
| defect | [Openbravo ERP] A. Platform | minor | always | 2016-11-11 10:56 | 2022-02-01 08:05 | ||||||
| Reporter | NaroaIriarte | View Status | public | ||||||||
| Assigned To | Triage Platform Base | ||||||||||
| Priority | normal | Resolution | open | Fixed in Version | |||||||
| Status | acknowledged | 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 | |||||||||||
| Review Assigned To | |||||||||||
| OBNetwork customer | No | ||||||||||
| 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); }  | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
		  Relationships		[ Relation Graph ] 
		[ Dependency Graph ] 
			 | 
||||||||
  | 
||||||||
  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 | OBNetwork customer | => No | 
| 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 | 
| Copyright © 2000 - 2009 MantisBT Group |