Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027706Openbravo ERPA. Platformpublic2014-09-29 13:022014-09-30 22:33
caristu 
AugustoMauch 
immediateminoralways
closedfixed 
5
pi 
3.0PR14Q4 
shankarb
Core
Pre packaging ( pi )
2014-07-14
pi
https://code.openbravo.com/erp/devel/pi/rev/fab9b7248bbb2a08d1486d2481f4478722a83186 [^]
No
0027706: Wrong filtering when there are records with the same identifier
Wrong filtering when there are records with the same identifier. The problem is caused because the criteria is using the same ID for both records, instead of using the corresponding identifier for each one:

{"operator":"or","criteria":[{"fieldName":"businessPartner","operator":"equals","value":"35BBCB75B5D64F87B3BA5C5E7984E733"},{"fieldName":"businessPartner","operator":"equals","value":"35BBCB75B5D64F87B3BA5C5E7984E733"}],"fieldName":"businessPartner","_constructor":"AdvancedCriteria"}
1) Create a new business partner with a name exactly as one of the already existing business partners, for example: Alimentos y Supermercados, S.A
2) Go to the [Sales Invoice] window, and create a new Sales Invoice for the new business partner. Complete it.
3) Clear all the filters. Using the drop-down list, select the two entries for "Alimentos y Supermercados, S.A.". Notice that is only showing records for one of them.
No tags attached.
caused by design defect 0025211 closed AugustoMauch Filter by selected value in FK uses identifier instead of ID 
related to defect 0027768 closed AugustoMauch Records with multiple identifiers result in multiple parts in the filter field in grid filtering 
related to defect 0028388 closed alostale Unexpected behavior after reopen "Transaction Document" dropdown selector with selected filter. 
Issue History
2014-09-29 13:02caristuNew Issue
2014-09-29 13:02caristuAssigned To => AugustoMauch
2014-09-29 13:02caristuModules => Core
2014-09-29 13:02caristuResolution time => 1418079600
2014-09-29 13:02caristuRegression level => Pre packaging ( pi )
2014-09-29 13:02caristuRegression introduced in release => pi
2014-09-29 13:02caristuTriggers an Emergency Pack => No
2014-09-29 13:02caristuIssue Monitored: networkb
2014-09-29 13:07caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6677#r6677
2014-09-29 13:15caristuDescription Updatedbug_revision_view_page.php?rev_id=6679#r6679
2014-09-29 13:15caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6680#r6680
2014-09-29 17:42AugustoMauchIssue Monitored: shankarb
2014-09-29 17:42AugustoMauchReview Assigned To => shankarb
2014-09-29 17:48hgbotCheckin
2014-09-29 17:48hgbotNote Added: 0070506
2014-09-29 17:48hgbotStatusnew => resolved
2014-09-29 17:48hgbotResolutionopen => fixed
2014-09-29 17:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/edf09f403355011408c33f2136e33af137c18923 [^]
2014-09-29 17:49AugustoMauchNote Added: 0070508
2014-09-29 17:49AugustoMauchStatusresolved => new
2014-09-29 17:49AugustoMauchResolutionfixed => open
2014-09-29 17:53AugustoMauchRelationship addedcaused by 0025211
2014-09-29 17:53AugustoMauchRegression date => 2014-07-14
2014-09-29 17:53AugustoMauchRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/fab9b7248bbb2a08d1486d2481f4478722a83186 [^]
2014-09-29 17:54AugustoMauchStatusnew => scheduled
2014-09-29 17:54AugustoMauchfix_in_branch => pi
2014-09-29 17:54AugustoMauchStatusscheduled => resolved
2014-09-29 17:54AugustoMauchResolutionopen => fixed
2014-09-30 08:05shankarbNote Added: 0070533
2014-09-30 08:05shankarbStatusresolved => closed
2014-09-30 08:05shankarbFixed in Version => 3.0PR14Q4
2014-09-30 22:33hudsonbotCheckin
2014-09-30 22:33hudsonbotNote Added: 0070586
2014-10-06 11:50mtaalRelationship addedrelated to 0027768
2014-12-16 13:58alostaleRelationship addedrelated to 0028388

Notes
(0070506)
hgbot   
2014-09-29 17:48   
Repository: erp/devel/pi
Changeset: edf09f403355011408c33f2136e33af137c18923
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 29 17:41:21 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/edf09f403355011408c33f2136e33af137c18923 [^]

Fixes issue 27706: fk filters work having several records with same identifier

The problem was that the new way if filtering foreign keys by using their ids instead of their identifiers did not support having several records with the same identifier. Note that this is a corner case, as it should not happen that two records in the same table have the same identifier.

To fix this, the getRecordIdFromIdentifier function has been reworked to getRecordIdsFromIdentifier, because a given identifier can hit several records, each one with its own id. Now, if for instance the user clicks on the identifier x, and there are several records with the x identifier, all those records will be checked in the picklist.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
---
(0070508)
AugustoMauch   
2014-09-29 17:49   
Reopened to enter regression fields
(0070533)
shankarb   
2014-09-30 08:05   
Code reviewed and verified in pi changeset 6c864add1905
(0070586)
hudsonbot   
2014-09-30 22:33   
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/2cae02185081 [^]
Maturity status: Test