Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023211Openbravo ERPA. Platformpublic2013-03-04 09:402013-03-17 09:24
mtaal 
AugustoMauch 
urgentcriticalhave not tried
closedfixed 
5
 
3.0MP223.0MP22 
shankarb
Core
No
0023211: Insert in grid does not work correctly when there are many existing rows
When the db has more than a 100 records, i.e. when the grid has not loaded all of them at once then insert-in-grid does not show the new inserted line (to-edit) when clicking the insert button in the top.
Goto reference window
Make sure that no record is selected
Click insert-in-grid
You can see the grid scrolling quickly to the new line, but then the grid loads the next batch
I think the solution is to not insert the new line at the end of the current loaded set (causing a new load of the next page).
It is better to insert the new line in the current viewport in the top, for example as the second line in the viewport.
No tags attached.
has duplicate defect 0022047 closed AugustoMauch [Reliability] when we have few hundred records, then i grid view when we create new record user not able to enter details 
has duplicate defect 0023429 closed AugustoMauch New record does not work correctly when there are more than 100 records in the grid 
? issue23211.export (1,411) 2013-03-06 13:42
https://issues.openbravo.com/file_download.php?file_id=6017&type=bug
Issue History
2013-03-04 09:40mtaalNew Issue
2013-03-04 09:40mtaalAssigned To => AugustoMauch
2013-03-04 09:40mtaalModules => Core
2013-03-04 09:40mtaalTriggers an Emergency Pack => No
2013-03-04 13:13AugustoMauchTarget Version3.0MP21 => 3.0MP22
2013-03-05 17:40AugustoMauchRelationship addedhas duplicate 0022047
2013-03-06 13:42AugustoMauchFile Added: issue23211.export
2013-03-06 13:42AugustoMauchStatusnew => scheduled
2013-03-06 13:42AugustoMauchfix_in_branch => pi
2013-03-06 14:56rgorisNote Added: 0057101
2013-03-06 16:06rgorisNote Edited: 0057101bug_revision_view_page.php?bugnote_id=0057101#r4469
2013-03-07 12:17AugustoMauchIssue Monitored: shankarb
2013-03-07 12:17AugustoMauchReview Assigned To => shankarb
2013-03-07 12:17AugustoMauchfix_in_branchpi =>
2013-03-07 12:19AugustoMauchNote Added: 0057125
2013-03-07 12:20hgbotCheckin
2013-03-07 12:20hgbotNote Added: 0057126
2013-03-07 12:20hgbotStatusscheduled => resolved
2013-03-07 12:20hgbotResolutionopen => fixed
2013-03-07 12:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/47b25b3ec9ab06d7c7eba76cbbcdb7e71be782a2 [^]
2013-03-17 09:24shankarbNote Added: 0057281
2013-03-17 09:24shankarbStatusresolved => closed
2013-03-17 09:24shankarbFixed in Version => 3.0MP22
2013-03-28 23:26AugustoMauchRelationship addedhas duplicate 0023429

Notes
(0057101)
rgoris   
2013-03-06 14:56   
(edited on: 2013-03-06 16:06)
As discussed with Augusto, we will fix it as follows:
1) In grid view, Insert Row, when nothing is selected, will add a row at the bottom of the grid
2) In grid view, Insert Row, when a row is selected, will insert a row directly below the selected row.
3) In grid view, when not all rows are loaded/cached, Insert Row will add a row at the top of the grid
4) In grid view, in case of large grids that are not loaded/cached at once, but the user manages to scroll down till the bottom (so that all rows are eventually loaded), Insert Row will add a row at the bottom.

Note that this issue does not address situations where records are added via form view. The current behaviour is good(enough).

(0057125)
AugustoMauch   
2013-03-07 12:19   
Test plan:
- Open the Unit of Measure window
- Do not select any record and click the Insert Row button. The record should be added in the last position of the grid.

- Open the Country and Region window
- Do not select any record and click the Insert Row button. The record should be added in the first position.

- Open the Country and Region window
- Select a record and click the Insert Row button. The record should be added below the selected record

- Open the Country and Region window
- Enter a filter in the name column: "island". Do not select any record and click the Insert Row button. The record should be added in the last position.
(0057126)
hgbot   
2013-03-07 12:20   
Repository: erp/devel/pi
Changeset: 47b25b3ec9ab06d7c7eba76cbbcdb7e71be782a2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 06 13:41:48 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/47b25b3ec9ab06d7c7eba76cbbcdb7e71be782a2 [^]

Fixes issue 23211: Fixes adding rows in a grid with many existing rows

The behaviour of the addition of rows in the grid now mimics the behavior of the creation of records in the form view:
- If not all records are cached in the grid, the record is added in the first position
- If all records are cached in the grid, the record is added in the last position.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0057281)
shankarb   
2013-03-17 09:24   
Code reviewed and tested in pi changeset c1cf111b6a22