Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2016-08-30 10:582016-12-23 08:15
ReporteralostaleView Statuspublic 
Assigned ToNaroaIriarte 
PriorityhighResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revisionbb721685f50a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0033853: summary functions: extra DS requests when relocating grid column

DescriptionIf a grid has at least a column with a summary function, when any column is relocated to another position, 3 DS requests to calculate summary function values are triggered.
Steps To Reproduce1. Open Sales Order window
2. Add a summary function on any column
3. Drag any column to a different position
   -> Check 3 DS requests are executed
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033588 closedcaristu Datasource Request done having a summary function with lazy filtering enabled 
related to defect 0033626 closedNaroaIriarte Unneeded datasource request after cancelling a newly created record in grid view having summary functions 

-  Notes
hgbot (developer)
2016-12-14 12:53

Repository: erp/devel/pi
Changeset: bb721685f50aa502095c9b8be09f66595b8d9106
Author: Naroa Iriarte <naroa.iriarte <at>>
Date: Mon Dec 12 16:10:29 2016 +0100
URL: [^]

Fixed issue 33853: There were too much DS request

When a column with a summary function was set, if any of the grid columns was reordered, there were three DS requests triggered. To fix the problem two different things have been done. The first, in ob-view-grid.js, consists on setting the showGridSummary property to false before the call to the function "reorderField" of the Super- This avoids one flow of smartclient which was, at the end, triggering two DS requests.
The second approach is also in ob-view-grid, but also in ob-grid. The problem was that when the ob-grid.getSummaryRow function was invoked, the return statement was calling the "getSummaryRow" function of the Super. There, once again a DS request was triggered. To fix this, a new object has been created. This object contains three properties. One of them is a property which is true if the columns have been reordered.
Now, in the ob-grid.getSummaryRow, if that property is true and if there is a summary function, the summary row is returned.

M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
alostale (developer)
2016-12-16 08:38
edited on: 2016-12-16 08:48


A. Incorrect behavior
1. Open a window without any summary function
2. Move any column in grid to another position
  -> ERROR: Summary function row appears with "no items to show" message

B. Code review
ob-view-grid.js, ln 986
All the variables in a function must be declared on top of the function: [^] [^]

hgbot (developer)
2016-12-16 10:43

Repository: erp/devel/pi
Changeset: a5d7d303b6c2b96bee3f652c918d83909bde3d92
Author: Naroa Iriarte <naroa.iriarte <at>>
Date: Fri Dec 16 10:33:06 2016 +0100
URL: [^]

Related to issue 33853: Code review improvements

In js variables must be declared at the top of the function.
Also there were problems when reordering if there was not a summary function declared. This has been prevented with an if statement. A new function has been created, this, handles the behavior of the summary functions' grid when it is necessary.

M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
hudsonbot (developer)
2016-12-16 18:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
hudsonbot (developer)
2016-12-16 18:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
alostale (developer)
2016-12-23 08:15

code reviewed


1. no extra request when relocating columns having summary functions in grid
2. working fine when relocating columns without summary functions

- Issue History
Date Modified Username Field Change
2016-08-30 10:58 alostale New Issue
2016-08-30 10:58 alostale Assigned To => platform
2016-08-30 10:58 alostale Modules => Core
2016-08-30 10:58 alostale Triggers an Emergency Pack => No
2016-08-30 10:58 alostale Tag Attached: Performance
2016-08-30 10:58 alostale Relationship added related to 0033588
2016-08-30 10:59 alostale Status new => acknowledged
2016-08-30 14:00 caristu Relationship added related to 0033626
2016-12-01 13:20 alostale Priority urgent => normal
2016-12-01 14:05 alostale Priority normal => urgent
2016-12-01 14:05 alostale Priority urgent => high
2016-12-02 09:00 NaroaIriarte Assigned To platform => NaroaIriarte
2016-12-02 09:32 NaroaIriarte Status acknowledged => scheduled
2016-12-14 12:52 NaroaIriarte Review Assigned To => alostale
2016-12-14 12:53 hgbot Checkin
2016-12-14 12:53 hgbot Note Added: 0092349
2016-12-14 12:53 hgbot Status scheduled => resolved
2016-12-14 12:53 hgbot Resolution open => fixed
2016-12-14 12:53 hgbot Fixed in SCM revision => [^]
2016-12-16 08:38 alostale Note Added: 0092431
2016-12-16 08:38 alostale Status resolved => new
2016-12-16 08:38 alostale Resolution fixed => open
2016-12-16 08:48 alostale Note Edited: 0092431 View Revisions
2016-12-16 10:43 hgbot Checkin
2016-12-16 10:43 hgbot Note Added: 0092467
2016-12-16 10:54 NaroaIriarte Status new => scheduled
2016-12-16 10:54 NaroaIriarte Status scheduled => resolved
2016-12-16 10:54 NaroaIriarte Resolution open => fixed
2016-12-16 18:39 hudsonbot Checkin
2016-12-16 18:39 hudsonbot Note Added: 0092711
2016-12-16 18:39 hudsonbot Checkin
2016-12-16 18:39 hudsonbot Note Added: 0092725
2016-12-23 08:15 alostale Note Added: 0092955
2016-12-23 08:15 alostale Status resolved => closed
2016-12-23 08:15 alostale Fixed in Version => 3.0PR17Q1

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker