Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027768Openbravo ERPA. Platformpublic2014-10-06 11:492014-12-30 23:22
mtaal 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
3.0PR14Q2.5 
3.0PR15Q1 
alostale
Core
No
0027768: Records with multiple identifiers result in multiple parts in the filter field in grid filtering
When there are records with the same identifier which are being used as a foreign key in another table. Then the filtering on these records results in an or-clause in the filter column. Even if only one record is selected.

See this movie for an example:
http://screencast.com/t/NLtQxgEJa4M [^]
Edit business partners so that they have the same identifier.
Go to sales order/invoice window, make sure that there are multiple orders/invoices each for the different BPs (with the same identifier)
Filter on the BP on the one with the multiple identical identifiers.
See that the or clause gets bigger and bigger when refreshing the grid

Note, this issue occurs eventhough the patch for the 27706 issue was applied.
No tags attached.
related to defect 0027706 closed AugustoMauch Wrong filtering when there are records with the same identifier 
Issue History
2014-10-06 11:49mtaalNew Issue
2014-10-06 11:49mtaalAssigned To => AugustoMauch
2014-10-06 11:49mtaalModules => Core
2014-10-06 11:49mtaalTriggers an Emergency Pack => No
2014-10-06 11:50mtaalProposed Solution updated
2014-10-06 11:50mtaalRelationship addedrelated to 0027706
2014-10-06 11:53mtaalversion => 3.0PR14Q2.5
2014-10-06 11:55mtaalTarget Version3.0PR14Q4 =>
2014-10-06 16:27jonalegriaesarteResolution time => 1415055600
2014-10-07 17:22AugustoMauchIssue Monitored: alostale
2014-10-07 17:22AugustoMauchReview Assigned To => alostale
2014-10-07 17:23hgbotCheckin
2014-10-07 17:23hgbotNote Added: 0070780
2014-10-07 17:23hgbotStatusnew => resolved
2014-10-07 17:23hgbotResolutionopen => fixed
2014-10-07 17:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a9fd2f40c5ba9333a1a7cfd4a1c379d0ab2c7f09 [^]
2014-10-08 09:02alostaleNote Added: 0070794
2014-10-08 09:02alostaleStatusresolved => closed
2014-10-08 09:02alostaleFixed in Version => 3.0PR15Q1
2014-12-30 23:22hudsonbotCheckin
2014-12-30 23:22hudsonbotNote Added: 0072914

Notes
(0070780)
hgbot   
2014-10-07 17:23   
Repository: erp/devel/pi
Changeset: a9fd2f40c5ba9333a1a7cfd4a1c379d0ab2c7f09
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 07 17:22:16 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a9fd2f40c5ba9333a1a7cfd4a1c379d0ab2c7f09 [^]

Fixes issue 27768: Criteria built properly for rows with non unique identifiers

The problem was that when building the list of ids to be used in an id-filter, the list could contain duplicate values.

Consider the following case: There are two business partner with the same identifier. When one of them is selected in the filter drop down, both of them will actually be filtered, due to having the same identifier. When the criteria was being built for this field, each checkbox checked produced 2 ids, because there were two records with different ids but with the same identifier. If both records are selected, then each of them would add the two ids, resulting in four ids.

This has been fixed by making sure there are no duplicate values in the list of ids.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
---
(0070794)
alostale   
2014-10-08 09:02   
code reviewed

tested:

Having several BPs with same identifier in Sales Order window
1. filter by one of these BPs --> only records for that one are shown
2. unselect filter for 1st one and select 2nd one --> only records for that one are shown
3. select both --> records for both appear, texbox shown only these 2
4. copy direct link and apply it --> works fine
5. save view, close window and apply saved view --> works fine
(0072914)
hudsonbot   
2014-12-30 23:22   
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/6525fe229e06 [^]
Maturity status: Test