Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024687Openbravo ERPA. Platformpublic2013-09-04 10:392013-11-19 19:07
alostale 
dbaz 
normalminoralways
closedfixed 
5
 
3.0MP30 
alostale
Core
No
0024687: Double DataSource request when there using a saved view
Whenever a window's default view is a saved view, double request to DataSource is performed when the window is opened.
In a professional instance:

 -Open Sales Invoice window
 -Sort by Order Date column
 -Move Order Date column to the first position in grid
 -Remove all the columns in grid but Order Date and Document No.
 -Add "10000" (without the quotes) as the filter of the Document No. column
 -Save current view
 -Set saved view as default
 -Reopen Sales Invoice window
   -> Notice how 2 requests are done to Invoice DataSource
   -> Notice how the grid is opened in standard view and after that redrawn with saved view
The problem, similarly to described in issue 0024684, comes because initially standard view is opened and after that saved view is applied.

Unlike grid configuration, saved views are not stored locally in client, they are requested to backed and applied in the callback.

The solution might be to store locally if not the whole set of saved views which could be huge, at least which are the windows that have one applied by default. For these ones, don't do any request until saved view request callback.
No tags attached.
related to defect 0024684 closed alostale Double DataSource request when there is grid configuration 
related to defect 00256363.0PR14Q2 closed alostale Saved view filter reapplied after adding a column in grid 
causes defect 00282423.0PR15Q1 closed AugustoMauch First request to load the window data is not done under some circumnstances 
Issue History
2013-09-04 10:39alostaleNew Issue
2013-09-04 10:39alostaleAssigned To => AugustoMauch
2013-09-04 10:39alostaleModules => Core
2013-09-04 10:39alostaleTriggers an Emergency Pack => No
2013-09-04 10:39alostaleRelationship addedrelated to 0024684
2013-11-07 13:06dbazAssigned ToAugustoMauch => dbaz
2013-11-07 13:07dbazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5187#r5187
2013-11-07 13:08dbazNote Added: 0062048
2013-11-07 13:17dbazNote Added: 0062049
2013-11-07 13:18dbazReview Assigned To => alostale
2013-11-07 13:18dbazIssue Monitored: alostale
2013-11-07 13:23hgbotCheckin
2013-11-07 13:23hgbotNote Added: 0062051
2013-11-07 13:23hgbotStatusnew => resolved
2013-11-07 13:23hgbotResolutionopen => fixed
2013-11-07 13:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd5e1a38c069995d64d183c4e4e6d41259f5bed9 [^]
2013-11-15 07:48alostaleNote Added: 0062132
2013-11-15 07:48alostaleStatusresolved => closed
2013-11-15 07:48alostaleFixed in Version => 3.0MP30
2013-11-19 19:07hudsonbotCheckin
2013-11-19 19:07hudsonbotNote Added: 0062243
2014-02-04 15:26alostaleRelationship addedrelated to 0025636
2014-11-21 13:54AugustoMauchRelationship addedcauses 0028242

Notes
(0062048)
dbaz   
2013-11-07 13:08   
The fix of this issue should ensure that doesn't break these two:

https://issues.openbravo.com/view.php?id=22730 [^]
https://issues.openbravo.com/view.php?id=23333 [^]
(0062049)
dbaz   
2013-11-07 13:17   
Actually, the default saved views for the current user/role/org/client are stored in the preferences 'OBUIAPP_DefaultSavedView_xx'

This preference has two lacks that need to be fixed:
a) If a view is deleted, and it is the default one for the current logged user/role/org/client, the preference should be removed from the browser to avoid problems if the user closes and opens the window again
b) If a view is deleted, it should also be deleted all the preferences using this view (for any user/role/org/client).
(0062051)
hgbot   
2013-11-07 13:23   
Repository: erp/devel/pi
Changeset: cd5e1a38c069995d64d183c4e4e6d41259f5bed9
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Nov 07 13:23:04 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/cd5e1a38c069995d64d183c4e4e6d41259f5bed9 [^]

Fixed issue 24687: Removed double DataSource request in grid
when there is using a default saved view

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js
---
(0062132)
alostale   
2013-11-15 07:48   
Code reviewed and tested
(0062243)
hudsonbot   
2013-11-19 19:07   
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/ab71e0273dc1 [^]

Maturity status: Test