Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029867Openbravo ERPA. Platformpublic2015-05-13 13:422015-06-04 11:14
gorkaion 
dbaz 
immediatemajorhave not tried
closedfixed 
20Gentoo
 
3.0PR15Q33.0PR15Q3 
alostale
Core
No
0029867: Grid multiple selection is lost on refresh
When a grid that have several records selected is refreshed the selection is lost and only the first record of the selection keeps selected.

This happens refreshing the grid manually or after executing a multiple selection process.
1. Go to "Open/Close Period Control" window
2. Select several records and click on "refresh" toolbar button.
3. Only the first record keeps selected.
4. Select again some records and click on "Open/Close Period" button.
5. Execute the process
6. The grid is reloaded and only the first record keeps selected.
No tags attached.
related to defect 00298633.0PR15Q3 closed NaroaIriarte Multiple Selection Process Definition buttons with reference list shows wrong text 
Issue History
2015-05-13 13:42gorkaionNew Issue
2015-05-13 13:42gorkaionAssigned To => platform
2015-05-13 13:42gorkaionModules => Core
2015-05-13 13:42gorkaionTriggers an Emergency Pack => No
2015-05-13 13:52gorkaionRelationship addedrelated to 0029863
2015-05-13 16:43jonalegriaesarteResolution time => 1434751200
2015-05-13 16:43jonalegriaesarteTarget Version => 3.0PR15Q3
2015-05-13 18:26gorkaionPrioritynormal => immediate
2015-05-15 12:30alostaleStatusnew => acknowledged
2015-05-15 12:31alostaleNote Added: 0077489
2015-05-19 11:51alostaleStatusacknowledged => scheduled
2015-05-19 11:51alostaleAssigned Toplatform => dbaz
2015-05-28 19:46dbazReview Assigned To => alostale
2015-05-28 19:51hgbotCheckin
2015-05-28 19:51hgbotNote Added: 0077879
2015-05-28 19:51hgbotStatusscheduled => resolved
2015-05-28 19:51hgbotResolutionopen => fixed
2015-05-28 19:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4f48ce65dacf82e333d4406b67221e3d0481e162 [^]
2015-05-29 11:18hgbotCheckin
2015-05-29 11:18hgbotNote Added: 0077887
2015-05-29 11:44dbazNote Added: 0077888
2015-05-29 17:24hudsonbotCheckin
2015-05-29 17:24hudsonbotNote Added: 0077904
2015-05-29 17:24hudsonbotCheckin
2015-05-29 17:24hudsonbotNote Added: 0077905
2015-06-04 11:14alostaleNote Added: 0078053
2015-06-04 11:14alostaleStatusresolved => closed
2015-06-04 11:14alostaleFixed in Version => 3.0PR15Q3

Notes
(0077489)
alostale   
2015-05-15 12:31   
== Use case ==

In PR15Q1 refresh logic has been redesigned (always taking only into account single selection) [1]

Basically now when refreshing grid having a single record selected, it is requested the page where currently the record is in and in the response the record is selected again if it is in the new page, in case it is not present selection is lost.

The case of multiple selection is a little bit more complex. In the following scenario:
  * grid with 200 records
  * select 1st record
  * scroll down till last record (which is in a different page) and select it
  * refresh

Refresh requests a single page (changing this behavior can seriously damage performance), as selection is spread through different pages, it wouldn't be possible to preserve it.

== Proposed solution ==

Refresh action will continue requesting a single page (the one where there is at least one record selected).

In the response it will try to select again all records that were initially selected, if it is possible, we're done.

If the number of records selected in the response is smaller than the original amount of selected records, the ones that was possible to select will remain as selected and a message informing about partial selection lost will be displayed.



---
[1] http://wiki.openbravo.com/wiki/Projects:Prevent_Unneeded_Grid_Requests%26action/Technical_Specs [^] [^]
(0077879)
hgbot   
2015-05-28 19:51   
Repository: erp/devel/pi
Changeset: 4f48ce65dacf82e333d4406b67221e3d0481e162
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu May 28 19:51:06 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4f48ce65dacf82e333d4406b67221e3d0481e162 [^]

Fixed issue 29867: Now grid multiple selection is not lost on refresh

If the selected items are in different pages, only the items belonging to the land
page once the grid get refreshed will be shown. A message notifying this loss will
be shown (in the message bar if this is empty or as a popup if there is a message
already been displayed, to avoid loss its information if we come from a process
execution)

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0077887)
hgbot   
2015-05-29 11:18   
Repository: erp/devel/pi
Changeset: 535b08878cf723dc58ebc4e6700108dad65d210e
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri May 29 11:17:43 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/535b08878cf723dc58ebc4e6700108dad65d210e [^]

Related to issue 29867: grid checkboxes are now selected on refresh
when multiple records were selected

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0077888)
dbaz   
2015-05-29 11:44   
Testlink: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-8288 [^]
(0077904)
hudsonbot   
2015-05-29 17:24   
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/bd6740e1bbd3 [^]
Maturity status: Test
(0077905)
hudsonbot   
2015-05-29 17:24   
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/bd6740e1bbd3 [^]
Maturity status: Test
(0078053)
alostale   
2015-06-04 11:14   
code reviewed

tested:

* In Country window (sorted by ISO code)

1. Select 1st record and refresh -> selection is kept
2. Select 1st and 2nd records and refresh -> selection is kept
3. Select Andorra, Argentina and Switcherland (all in 1st page) and refresh -> selection is kept
4. Select Mexico (2nd page) and refresh -> selection is kept
5. Select Andorra (1st page) and Mexico (2nd page) and refresh -> Only Andorra is kept and a message is shown

* In Open/Close period window
6. Selection is kept after process execution