Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037451 | Openbravo ERP | A. Platform | public | 2017-12-11 16:05 | 2018-02-22 18:19 |
|
Reporter | samuel_nicuesa | |
Assigned To | AugustoMauch | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037451: Adaptive filtering is not applying the Country.Language filter properly |
Description | Language filter is not working properly when there are other filters applied.
In this case we are using currency and language fields to apply the filter. |
Steps To Reproduce | Login in the ERP using F&B International group admin role.
- Open country and region window.
- Select AED in currency filter. Only one country uses that currency. The result fit in the first page, so if more filters are applied, adaptive filtering will be used.
- Select Arabic in language filter. It shows the message "The applied filter resulted in 0 result" but there is actually one record to show. This is wrong.
- Click on the Refresh toolbar button to force the criteria to be evaluated on the back end. It will return one record as expected. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | duplicate of | defect | 0037097 | | closed | platform | Adaptive Filter by ID not working properly with table references using a not ID column as key column | has duplicate | defect | 0037452 | | closed | platform | Language filter is not working properly when there are few records on the grid. |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-12-11 16:05 | samuel_nicuesa | New Issue | |
2017-12-11 16:05 | samuel_nicuesa | Assigned To | => platform |
2017-12-11 16:05 | samuel_nicuesa | Modules | => Core |
2017-12-11 16:05 | samuel_nicuesa | Resolution time | => 1514761200 |
2017-12-11 16:05 | samuel_nicuesa | Triggers an Emergency Pack | => No |
2017-12-11 16:21 | samuel_nicuesa | Relationship added | related to 0037452 |
2017-12-12 10:14 | inigosanchez | Status | new => scheduled |
2017-12-12 10:14 | inigosanchez | Assigned To | platform => inigosanchez |
2018-02-01 19:54 | inigosanchez | Assigned To | inigosanchez => platform |
2018-02-01 19:54 | inigosanchez | Status | scheduled => acknowledged |
2018-02-05 09:42 | AugustoMauch | Assigned To | platform => AugustoMauch |
2018-02-05 09:51 | AugustoMauch | Summary | Language filter is not working properly when there are other filters applied. => Adaptive filtering is not applying the Country.Language filter properly |
2018-02-05 09:51 | AugustoMauch | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16623#r16623 |
2018-02-05 09:51 | AugustoMauch | Status | acknowledged => scheduled |
2018-02-06 19:10 | AugustoMauch | Review Assigned To | => caristu |
2018-02-06 19:19 | hgbot | Checkin | |
2018-02-06 19:19 | hgbot | Note Added: 0102226 | |
2018-02-06 19:19 | hgbot | Status | scheduled => resolved |
2018-02-06 19:19 | hgbot | Resolution | open => fixed |
2018-02-06 19:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/8725b521c897ab3b2ae18bd09adeefadc7c993c1 [^] |
2018-02-06 19:19 | hgbot | Checkin | |
2018-02-06 19:19 | hgbot | Note Added: 0102227 | |
2018-02-07 13:03 | AugustoMauch | Relationship replaced | has duplicate 0037452 |
2018-02-07 14:12 | caristu | Relationship added | duplicate of 0037097 |
2018-02-12 14:19 | caristu | Note Added: 0102334 | |
2018-02-12 14:19 | caristu | Status | resolved => closed |
2018-02-12 14:19 | caristu | Fixed in Version | => 3.0PR18Q2 |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102725 | |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102726 | |
Notes |
|
(0102226)
|
hgbot
|
2018-02-06 19:19
|
|
Repository: erp/devel/pi
Changeset: 8725b521c897ab3b2ae18bd09adeefadc7c993c1
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 06 19:08:50 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8725b521c897ab3b2ae18bd09adeefadc7c993c1 [^]
Fixes issue 37451: Fixes filtering of fks that dont use ids as key
The problem was that the foreign keys that did not use and id column as key (i.e. ad_country.ad_language) were not being properly
filtered locally in smartclient, because the criteria used the id of the referenced record, that was not available in the browser (it
was available in the query done in the back end, that is why only the client-side filtering was not working).
For instance, if the ad_language foreign key reference uses as key ad_language.ad_language instead of ad_language.ad_language_id, the criteria
will no longer be:
{
fieldName: 'language',
operator: 'equals',
value: '192'
}
Now it will be:
{
fieldName: 'language',
operator: 'equals',
value: 'en_US'
}
The AdvancedQueryBuilder has been adapted to support the new type of criteria.
There are also changes on ob-grid.js and ob-formitem-fk-filter to ensure that the criteria is properly displayed in the filter input.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
|
|
|
(0102227)
|
hgbot
|
2018-02-06 19:19
|
|
Repository: erp/devel/pi
Changeset: e15a97093931f2d1d52e7225643a63db53baef79
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 06 19:10:21 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e15a97093931f2d1d52e7225643a63db53baef79 [^]
Related with issue 37451: Adds tests
Tests have been added to check that the datasource returns properly the results using the updated criteria.
Selenium tests with the current infrastructure are not possible, since when they filter the grid, they do not
select the checkboxes of the foreign key combo boxes, they just enter the text in the filter input, and if done
that way the issue is not reproducible.
---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
A src-test/src/org/openbravo/test/datasource/NonIdForeignKeyFilters.java
---
|
|
|
|
Code reviewed + tested OK. |
|
|
|
|
|
|
|