Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034470
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2016-11-11 10:562022-02-01 08:05
ReporterNaroaIriarteView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034470: The manage variants filter is not working fine in some circumstances.

DescriptionIf 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 Reproduce1- 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 SolutionChange 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);
      }
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0034405pi closedNaroaIriarte 'Manage Variants' process returns no items to show when filtering 

-  Notes
There are no notes attached to this issue.

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker