Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029010 | Openbravo ERP | A. Platform | public | 2015-02-20 10:07 | 2015-04-01 08:47 |
|
Reporter | VictorVillar | |
Assigned To | AugustoMauch | |
Priority | immediate | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 3.0PR14Q3.6 | |
Target Version | | Fixed in Version | 3.0PR15Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2014-09-25 |
Regression introduced in release | 3.0PR14Q3.5 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/653cc69090124def179091b96d9d2d820cc47d2b [^] |
Triggers an Emergency Pack | No |
|
Summary | 0029010: the grid is filtering by relative date not the absolute |
Description | The grid is filtering by relative date not the absolute. |
Steps To Reproduce | Imagine that today is: 20/02/2015
As group admin role,
Go to Sales Order window.
Create one register for 20/02/2015
Save it.
Create a new one for 21/02/2015
Save it.
Filter the order date by the absolute day. Select 'Since date': TODAY from the dropdown, not the calendar - 'to date': blank
Save the view and set it as default.
The next day (in the current example 21/02/2015)
As group admin role,
Go to Sales Order window.
Realise that you can see the register with order date: 20/02/2015 and it is wrong, because the filter should filter by TODAY.
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | caused by | defect | 0027679 | | closed | shankarb | can't use FK drop down if grid is already filtered by a relative date |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-02-20 10:07 | VictorVillar | New Issue | |
2015-02-20 10:07 | VictorVillar | Assigned To | => AugustoMauch |
2015-02-20 10:07 | VictorVillar | Modules | => Core |
2015-02-20 10:07 | VictorVillar | Resolution time | => 1426546800 |
2015-02-20 10:07 | VictorVillar | Regression level | => Production - Confirmed Stable |
2015-02-20 10:07 | VictorVillar | Regression introduced in release | => 3.0PR14Q3.5 |
2015-02-20 10:07 | VictorVillar | Triggers an Emergency Pack | => No |
2015-02-20 10:08 | VictorVillar | Issue Monitored: networkb | |
2015-02-20 11:15 | eugeni | Issue Monitored: eugeni | |
2015-02-20 14:27 | AugustoMauch | Status | new => scheduled |
2015-02-20 14:27 | AugustoMauch | fix_in_branch | => pi |
2015-02-24 10:08 | alostale | Severity | major => minor |
2015-02-24 10:08 | alostale | fix_in_branch | pi => |
2015-02-24 11:58 | AugustoMauch | Note Added: 0074842 | |
2015-02-24 11:58 | AugustoMauch | Status | scheduled => feedback |
2015-02-24 12:14 | AugustoMauch | Note Added: 0074843 | |
2015-02-24 12:17 | alostale | Assigned To | AugustoMauch => VictorVillar |
2015-02-24 18:21 | AugustoMauch | Status | feedback => scheduled |
2015-02-24 18:21 | AugustoMauch | Note Added: 0074877 | |
2015-02-24 18:21 | AugustoMauch | fix_in_branch | => pi |
2015-02-24 18:49 | VictorVillar | fix_in_branch | pi => |
2015-02-24 18:49 | VictorVillar | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=7754#r7754 |
2015-02-24 18:54 | AugustoMauch | Regression date | => 2014-09-25 |
2015-02-24 18:54 | AugustoMauch | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/653cc69090124def179091b96d9d2d820cc47d2b [^] |
2015-02-24 22:18 | AugustoMauch | Issue Monitored: alostale | |
2015-02-24 22:18 | AugustoMauch | Assigned To | VictorVillar => AugustoMauch |
2015-02-24 22:18 | AugustoMauch | Review Assigned To | => alostale |
2015-02-24 22:19 | hgbot | Checkin | |
2015-02-24 22:19 | hgbot | Note Added: 0074888 | |
2015-02-24 22:19 | hgbot | Status | scheduled => resolved |
2015-02-24 22:19 | hgbot | Resolution | open => fixed |
2015-02-24 22:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/9645a99f13363ff71be9a0f1724f4be5853ad95a [^] |
2015-02-25 08:38 | alostale | Relationship added | caused by 0027679 |
2015-02-25 09:45 | AugustoMauch | Note Added: 0074898 | |
2015-02-25 21:22 | hudsonbot | Checkin | |
2015-02-25 21:22 | hudsonbot | Note Added: 0074945 | |
2015-03-02 09:01 | alostale | Note Added: 0075054 | |
2015-03-02 09:01 | alostale | Status | resolved => closed |
2015-03-02 09:01 | alostale | Fixed in Version | => 3.0PR15Q2 |
2015-04-01 08:05 | hgbot | Checkin | |
2015-04-01 08:05 | hgbot | Note Added: 0076192 | |
2015-04-01 08:05 | hgbot | Status | closed => resolved |
2015-04-01 08:05 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/9645a99f13363ff71be9a0f1724f4be5853ad95a [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/fce7cf4dee157ad80f6be87fa8b02a392b88aed8 [^] |
2015-04-01 08:47 | priyam | Status | resolved => closed |
2015-04-01 08:47 | priyam | Note Added: 0076283 | |
Notes |
|
|
Hi,
I have not been able to reproduce the proper behaviour in 3.0PR14Q3.4. The filtered day was the same even the day after setting it using the Today button. |
|
|
|
This is the smartclient code that is invoked when the Today button is invoked:
todayClick : function () {
var date = new Date();
this.dateClick(date.getFullYear(), date.getMonth(), date.getDate(), true);
},
It invokes the dateClick method with today's date, which is the same method that is invoked when a non-relative date is selected. The criteria built based on clicking the Today button will be the same that the criteria built after selecting manually todays date (by selected the proper year, month and day number).
This being considered, it is highly unlikely that at any point clicking on the Today button would generate a criteria that would change each passing day. |
|
|
|
The date filter is working as expected on a PR14Q3.3 instance, so the issue is actually a regression |
|
|
(0074888)
|
hgbot
|
2015-02-24 22:19
|
|
Repository: erp/devel/pi
Changeset: 9645a99f13363ff71be9a0f1724f4be5853ad95a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 24 22:16:04 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9645a99f13363ff71be9a0f1724f4be5853ad95a [^]
Fixes issue 29010: Grid is actually filtered using relative dates
The problem was that when a relative date filter was added to the grid and then used in a saved view, the saved view will not apply the relative date filter, but an absolute one. This was caused by this code in the OBViewGrid.convertCriteria function:
if (this.dataSource) {
criteria = this.dataSource.convertRelativeDates(criteria);
}
Every time that a criteria is sent to the backend (i.e. when storing a saved view), the criteria objects that contained relative dates wwere converted to absolute dates. This was done to fix this issue
[1], its problem being that the datasource used to populate the filter drop down did not support relative dates.
The function where that code was placed was too central, the criterias converted should have been only the ones used to populate the filter drop downs, but all the criterias were being converted. To fix this, the code has been adapted and moved to the OBFKFilterTextItem.getPickListFilterCriteria function.
[1] https://issues.openbravo.com/view.php?id=27679 [^]
---
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-view-grid.js
---
|
|
|
|
|
|
|
|
|
|
Code reviewed.
Tested:
-Test case defined in test link
-Issue 0027679 is still not reproducible
-Direct with relative dates link works:
* From URL
* From quick launch |
|
|
(0076192)
|
hgbot
|
2015-04-01 08:05
|
|
Repository: erp/backports/3.0PR15Q2
Changeset: fce7cf4dee157ad80f6be87fa8b02a392b88aed8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 24 22:16:04 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/fce7cf4dee157ad80f6be87fa8b02a392b88aed8 [^]
Fixes issue 29010: Grid is actually filtered using relative dates
The problem was that when a relative date filter was added to the grid and then used in a saved view, the saved view will not apply the relative date filter, but an absolute one. This was caused by this code in the OBViewGrid.convertCriteria function:
if (this.dataSource) {
criteria = this.dataSource.convertRelativeDates(criteria);
}
Every time that a criteria is sent to the backend (i.e. when storing a saved view), the criteria objects that contained relative dates wwere converted to absolute dates. This was done to fix this issue
[1], its problem being that the datasource used to populate the filter drop down did not support relative dates.
The function where that code was placed was too central, the criterias converted should have been only the ones used to populate the filter drop downs, but all the criterias were being converted. To fix this, the code has been adapted and moved to the OBFKFilterTextItem.getPickListFilterCriteria function.
[1] https://issues.openbravo.com/view.php?id=27679 [^]
---
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-view-grid.js
---
|
|
|
(0076283)
|
priyam
|
2015-04-01 08:47
|
|
closed again, as the status changes due to merge of tag 15Q1.2 to backport repo Q2 |
|