Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029010
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2015-02-20 10:072015-04-01 08:47
ReporterVictorVillarView Statuspublic 
Assigned ToAugustoMauch 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revisionfce7cf4dee15
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR14Q3.6SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2014-09-25
Regression introduced in release3.0PR14Q3.5
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/653cc69090124def179091b96d9d2d820cc47d2b [^]
Triggers an Emergency PackNo
Summary

0029010: the grid is filtering by relative date not the absolute

DescriptionThe grid is filtering by relative date not the absolute.
Steps To ReproduceImagine 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.

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0027679 closedshankarb can't use FK drop down if grid is already filtered by a relative date 

-  Notes
(0074842)
AugustoMauch (developer)
2015-02-24 11:58

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.
(0074843)
AugustoMauch (developer)
2015-02-24 12:14

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.
(0074877)
AugustoMauch (developer)
2015-02-24 18:21

The date filter is working as expected on a PR14Q3.3 instance, so the issue is actually a regression
(0074888)
hgbot (developer)
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
---
(0074898)
AugustoMauch (developer)
2015-02-25 09:45

A testlink test case has been created [1]. In order to automate this test, it should be possible to created Saved Views using selenium.

[1] http://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-8050 [^]
(0074945)
hudsonbot (developer)
2015-02-25 21: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/96ba7b028cb7 [^]
Maturity status: Test
(0075054)
alostale (developer)
2015-03-02 09:01

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 (developer)
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 (administrator)
2015-04-01 08:47

closed again, as the status changes due to merge of tag 15Q1.2 to backport repo Q2

- 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 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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker