Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027297Openbravo ERPA. Platformpublic2014-08-08 11:292014-09-01 13:55
AugustoMauch 
AugustoMauch 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR14Q43.0PR14Q4 
alostale
Core
No
0027297: Unexpected behavior when a record is created with lazy filtering activated
If a grid is filtering lazily and the user creates a new record when the grid has not yet been loaded, the following happens:
- After saving the new record a wrong message appears in its active subtab. It should show "No records yet.Create One", but shows "The parent record is an unsaved new record, save it to create child records."
- After saving the new record, if the user goes back to the grid view the record is not shown. It will be shown when the user explicitedly loads the grid contents.
As System Admin:
- Open the Grid Configuration at System Level Window
- Create a new record, check the flag Lazy Filtering on Grid and save.
- Open the Unit of Measure Window
- Create new record and save. Check that the message of the subtab is not proper.
- Open the grid view. Check that the new record is not shown.
No tags attached.
Issue History
2014-08-08 11:29AugustoMauchNew Issue
2014-08-08 11:29AugustoMauchAssigned To => AugustoMauch
2014-08-08 11:29AugustoMauchModules => Core
2014-08-08 11:29AugustoMauchTriggers an Emergency Pack => No
2014-08-12 10:32AugustoMauchIssue Monitored: alostale
2014-08-12 10:36AugustoMauchAssigned ToAugustoMauch => alostale
2014-08-12 10:40hgbotCheckin
2014-08-12 10:40hgbotNote Added: 0069306
2014-08-12 10:40hgbotStatusnew => resolved
2014-08-12 10:40hgbotResolutionopen => fixed
2014-08-12 10:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/aeabf2df2bf119da0c47b461f8f5a084587a6207 [^]
2014-08-12 20:57hudsonbotCheckin
2014-08-12 20:57hudsonbotNote Added: 0069330
2014-08-14 08:49alostaleNote Added: 0069365
2014-08-14 08:49alostaleStatusresolved => new
2014-08-14 08:49alostaleResolutionfixed => open
2014-08-14 08:51alostaleAssigned Toalostale => AugustoMauch
2014-08-14 12:13AugustoMauchReview Assigned To => alostale
2014-08-14 12:14hgbotCheckin
2014-08-14 12:14hgbotNote Added: 0069369
2014-08-14 12:14hgbotStatusnew => resolved
2014-08-14 12:14hgbotResolutionopen => fixed
2014-08-14 12:14hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/aeabf2df2bf119da0c47b461f8f5a084587a6207 [^] => http://code.openbravo.com/erp/devel/pi/rev/74d15eec44dbd31018b7680f51f6cd8a14b0e0f8 [^]
2014-08-14 13:15alostaleNote Added: 0069373
2014-08-14 13:15alostaleStatusresolved => new
2014-08-14 13:15alostaleResolutionfixed => open
2014-08-14 13:15alostaleNote Edited: 0069373bug_revision_view_page.php?bugnote_id=0069373#r6274
2014-08-18 01:58hudsonbotCheckin
2014-08-18 01:58hudsonbotNote Added: 0069445
2014-08-19 14:54hgbotCheckin
2014-08-19 14:54hgbotNote Added: 0069511
2014-08-19 14:54hgbotStatusnew => resolved
2014-08-19 14:54hgbotResolutionopen => fixed
2014-08-19 14:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/74d15eec44dbd31018b7680f51f6cd8a14b0e0f8 [^] => http://code.openbravo.com/erp/devel/pi/rev/c1f6e19bd4bf043c7e08ca0d7c6949b261a7f377 [^]
2014-08-20 15:14hudsonbotCheckin
2014-08-20 15:14hudsonbotNote Added: 0069548
2014-09-01 13:55alostaleNote Added: 0069889
2014-09-01 13:55alostaleStatusresolved => closed
2014-09-01 13:55alostaleFixed in Version => 3.0PR14Q4

Notes
(0069306)
hgbot   
2014-08-12 10:40   
Repository: erp/devel/pi
Changeset: aeabf2df2bf119da0c47b461f8f5a084587a6207
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Aug 12 10:40:01 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/aeabf2df2bf119da0c47b461f8f5a084587a6207 [^]

Fixes issue 27297: Bad behavior when a record is created with lazy filtering

The problem was that the grid data, a ResultSet, was not being created until the first fetch call was done. If a record is created before the first fetch call, which is possible only using lazy filtering, then the record will not be shown in the grid until a fetch call is done, although it will be stored properly in the database. This also results in a wrong message being shown in the active subtab after saving the record.

To fix this, and empty ResultSet is created when a new record is created if the grid does not have a ResultSet yet.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0069330)
hudsonbot   
2014-08-12 20:57   
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/f93c6f350902 [^]
Maturity status: Test
(0069365)
alostale   
2014-08-14 08:49   
Test cases:

1. Create record in form and go back to grid -> works ok
2. Create record in grid -> works ok
3. Create record from Create New Quick Launch -> still same behavior as before the fix
4. Create record from Create new in Recent Views -> still same behavior as before the fix

In cases 1 and 2, after creating records in this situation, subsequent filtering is only applied in local.

Steps to reproduce:
-Open UOM window
-In grid view create several records with EDI codes: a1, a2, a3, a4
-Filter EDI code by a1 and click enter or tick icon -> ok, a1 record is filtered
-Filter EDI code by a2 and click enter or tick icon -> ok, a2 record is filtered
-Filter EDI code by KG and click enter or tick icon-> error no record is shown
-Remove filters and click enter or tick icon -> error only new records are shown but not the ones that existed before

The only way to retrieve existent records is by clicking on the refresh icon.
(0069369)
hgbot   
2014-08-14 12:14   
Repository: erp/devel/pi
Changeset: 74d15eec44dbd31018b7680f51f6cd8a14b0e0f8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 14 12:09:54 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/74d15eec44dbd31018b7680f51f6cd8a14b0e0f8 [^]

Fixes issue 27297: Bad behavior when a record is created with lazy filtering

Fixed two problems:
- ResultSet was not being initialized if the records were created in a way other than using the toolbar buttons. To fix this, the code to initialize the ResultSet has been moved to the methods in charge of created the records in the grid/form view, instead of on the action methods of the buttons.
- Adaptive filtering was not working properly. To fix this, now after creating a new record in a grid whose ResultSet is not initialized, the first time that grid is filtered adaptive filtered will not be used, to force fetching the records that are stored in the server. From then on the adaptive filtering will work as usual.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
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/toolbar/ob-toolbar.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
(0069373)
alostale   
2014-08-14 13:15   
Tested all the cases defined above and working fine.

Still one case not working as expected:
-Open UOM window
-Create new record in grid

check:
-click the tick icon in filters: it should retrieve all records but only created ones are present
or
-go to filter and without editing any field press enter: it should retrieve all records but only created ones are present

(0069445)
hudsonbot   
2014-08-18 01:58   
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/ed428d44c18c [^]
Maturity status: Test
(0069511)
hgbot   
2014-08-19 14:54   
Repository: erp/devel/pi
Changeset: c1f6e19bd4bf043c7e08ca0d7c6949b261a7f377
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Aug 19 14:53:59 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c1f6e19bd4bf043c7e08ca0d7c6949b261a7f377 [^]

Fixes issue 27297: Bad behavior when a record is created with lazy filtering

There was one case that was not being considered: Clicking the 'Apply filters' icon just after creating a new record without any criteria applied. It was not working because it was expecting the grid data not to be a ResultSet, but now it is a ResultSet.

To fix this, a new flag has been created to specify when the grid has yet to load its data.

---
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/utilities/ob-utilities.js
---
(0069548)
hudsonbot   
2014-08-20 15:14   
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/2b6fe7d2babe [^]
Maturity status: Test
(0069889)
alostale   
2014-09-01 13:55   
working now on all the described cases