Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034405Openbravo ERPA. Platformpublic2016-11-07 10:252016-12-16 18:38
JONHM 
NaroaIriarte 
highmajoralways
closedfixed 
5
 
pi3.0PR17Q1 
alostale
Core
No
0034405: 'Manage Variants' process returns no items to show when filtering
When we run 'Manage Variants' process and filter and selecting some variant, when we delete the filter filed to select another one, the process fails and shows 'no items to show'.
1) Create a 'product Characteristic' marked as 'Variant'.
2) Add some values to that created characteristic.
3) Create a new Product and check 'Is Generic' checkbox as true.
4) Add the Characteristic by navigating to the product tab, also marked as 'Variant'.
5) Run process 'Generate Variants'.
6) Now run 'Manage Variants', a pick&execute window is opened.
7) Filter by one of those variants (whatever0) and select it.
8) Now delete that filter text.
--> It shows message 'No items to show'.
No tags attached.
related to defect 0034469 closed NaroaIriarte The manage variants record selection is not working properly 
related to defect 0034470 acknowledged Triage Platform Base The manage variants filter is not working fine in some circumstances. 
related to defect 0034628 closed collazoandy4 Manage variants can return unexpected values 
Issue History
2016-11-07 10:25JONHMNew Issue
2016-11-07 10:25JONHMAssigned To => platform
2016-11-07 10:25JONHMModules => Core
2016-11-07 10:25JONHMTriggers an Emergency Pack => No
2016-11-08 11:23JONHMResolution time => 1479682800
2016-11-08 11:23JONHMSeverityminor => major
2016-11-10 12:41NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-11-10 12:41NaroaIriarteStatusnew => acknowledged
2016-11-10 12:41NaroaIriarteStatusacknowledged => scheduled
2016-11-11 10:27NaroaIriarteRelationship addedrelated to 0034469
2016-11-11 10:56NaroaIriarteRelationship addedrelated to 0034470
2016-11-15 10:43NaroaIriarteReview Assigned To => alostale
2016-11-15 10:58hgbotCheckin
2016-11-15 10:58hgbotNote Added: 0091541
2016-11-15 10:58hgbotStatusscheduled => resolved
2016-11-15 10:58hgbotResolutionopen => fixed
2016-11-15 10:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9bfd8bde32b287625174384e8946c72f9aa06f5b [^]
2016-11-25 08:52alostaleNote Added: 0091804
2016-11-25 08:52alostaleStatusresolved => closed
2016-11-25 08:52alostaleFixed in Version => 3.0PR17Q1
2016-11-25 09:05alostaleRelationship addedrelated to 0034628
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092627

Notes
(0091541)
hgbot   
2016-11-15 10:58   
Repository: erp/devel/pi
Changeset: 9bfd8bde32b287625174384e8946c72f9aa06f5b
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Fri Nov 11 10:10:29 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9bfd8bde32b287625174384e8946c72f9aa06f5b [^]

Fixed issue 34405: The Manage Variants filter was not working fine.

If the filter was used, after that a record was selected and after that the filter was cleaned up, the "no items to show" message was shown instead of showing all the records.
The problem was that the "ManageVariantsDS" manual datasource was not capable of managing the criteria: "criteria:{"fieldName":"id","operator":"notNull"}" which is the criteria that must return every record.
The problem was in this code line: "value = criteria.getString("value")" because the creiteria has not value, it only has fieldName and operator. It was throwing an exception which was not being correctly handled in the catch. This problem has been solved also, by properly handling the exception by showing log.
The first problem has been solved by processing the concrete criteria properly. If this criteria is found, it means that every record must be shown, so it continues with doing nothing.
There was a another problem that has been solved and it is that the searchKey and the nameFilters were acting as a "Contains" filter instead of like as an "iContains".
This has been fixed by changing the "contains" method of StringUtils by the "containsIgnoreCase".

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0091804)
alostale   
2016-11-25 08:52   
code reviewed + tested
(0092627)
hudsonbot   
2016-12-16 18:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test