Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036459Openbravo ERPA. Platformpublic2017-07-11 14:572017-09-21 16:49
alostale 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR17Q4 
alostale
Core
No
0036459: error thrown when refreshing after cancelling row creation before FIC response is processed
When creating a new record in grid, if edition is cancelled before a FIC request is processed and after that, refresh grid is clicked, error about unpaged request is thrown.
1. Add artificial delay in SL_Order_Product callout code: Thread.sleep(5_000L);
2. Create a [Sales Quotation] header
3. Move to the [Lines] tab. Insert Row in grid mode
4. Select a product
5. Before callout response is received click on cancel changes button
6. Click on refresh
  -> Error about unpaged request is thrown
In discardEdits function in ob-view-grid.js there are 2 code branches:

if (!preventConfirm && ((editForm && editForm.hasChanged) || this.rowHasErrors(rowNum))) {
  ...
} else {
  ...
}

Both of them were initially very similar (need to check for diffs), but after time, they have diverged most probably due to mistakes. Ie. for this case, code that fixes 0031434 was forgotten to be included also in 1st branch.

These 2 branches should be merged, so that the code is centrally maintained.
Performance
related to defect 0036457 closed alostale inconsistent grid state if cancelling changes before receiving FIC response 
related to defect 0031434 closed caristu Error thrown when refreshing the grid after canceling the creation of a record in a child tab 
related to defect 00281883.0PR15Q1 closed AugustoMauch Wrong information displayed after refresh a tab having an error when saving in grid view 
related to defect 0033626 closed NaroaIriarte Unneeded datasource request after cancelling a newly created record in grid view having summary functions 
has duplicate defect 0035986 closed platform Wrong behavior after cancelling a record edition in grid view having the focus on a numeric field 
Issue History
2017-07-11 14:57alostaleNew Issue
2017-07-11 14:57alostaleAssigned To => platform
2017-07-11 14:57alostaleModules => Core
2017-07-11 14:57alostaleTriggers an Emergency Pack => No
2017-07-11 14:57alostaleTag Attached: Performance
2017-07-11 14:58alostaleRelationship addedrelated to 0036457
2017-07-11 14:58alostaleRelationship addedrelated to 0031434
2017-07-11 14:58alostaleAssigned Toplatform => caristu
2017-07-11 14:58alostaleStatusnew => scheduled
2017-08-21 10:28caristuRelationship addedrelated to 0028188
2017-08-21 12:09caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15657#r15657
2017-08-21 13:02caristuNote Added: 0098555
2017-08-22 09:18caristuRelationship addedrelated to 0033626
2017-08-22 09:37caristuNote Edited: 0098555bug_revision_view_page.php?bugnote_id=0098555#r15664
2017-08-22 09:37caristuNote Edited: 0098555bug_revision_view_page.php?bugnote_id=0098555#r15665
2017-08-22 10:09hgbotCheckin
2017-08-22 10:09hgbotNote Added: 0098571
2017-08-22 10:09hgbotStatusscheduled => resolved
2017-08-22 10:09hgbotResolutionopen => fixed
2017-08-22 10:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a8a4aa77612230fd18bc49f3d69e12bb2f9c3565 [^]
2017-08-22 10:11caristuReview Assigned To => alostale
2017-08-23 09:04caristuRelationship addedhas duplicate 0035986
2017-08-29 08:13alostaleNote Added: 0098676
2017-08-29 08:13alostaleStatusresolved => closed
2017-08-29 08:13alostaleFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099317

Notes
(0098555)
caristu   
2017-08-21 13:02   
(edited on: 2017-08-22 09:37)
Summary of the changes involved in the differences currently present between the two branches: https://docs.google.com/spreadsheets/d/1n7ydqkvNZdCJbERiq1tqP7yoemey6sCT6HV5Tf7XQ3I/edit#gid=0 [^]

(0098571)
hgbot   
2017-08-22 10:09   
Repository: erp/devel/pi
Changeset: a8a4aa77612230fd18bc49f3d69e12bb2f9c3565
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 22 09:43:37 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a8a4aa77612230fd18bc49f3d69e12bb2f9c3565 [^]

fixes bug 36459: error when refresh after discard changes before FIC response

This problem was solved with the code that fixes issue 0031434 just for the case of cancelling a record which does not contain any change. Otherwise, the issue could be still reproduced because of the fact of having an if statement with two code branches inside the discardEdits function. That code was forgotten to be included also in the first branch.

That if statement was created in order to identify if the record being cancelled contained changes. In that case, a dialog was being shown to the user in order to ask for confirmation to discard the changes.

After some time, that dialog was removed (see revision 92ecb7ac760a). That means that since that point the if statement is no longer needed. For this reason, the two branches have been merged.

Note that this change also fixes completely issues 0031434 and 0033626, as they were partially fixed (fix only present in one of the branches).

---
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
---
(0098676)
alostale   
2017-08-29 08:13   
reviewed + tested
(0099317)
hudsonbot   
2017-09-21 16:49   
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/9750b78d3e5c [^]
Maturity status: Test