Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036611Openbravo ERPA. Platformpublic2017-08-04 13:512017-09-27 09:15
shuehner 
inigosanchez 
highmajorhave not tried
closedfixed 
5
 
3.0PR17Q4 
caristu
Core
No
0036611: 2nd attempt to 'Delete row' after first delete was stopped does not work and shows 'Deleting ...' forever
Deleting a already processed "Good Shipment" (having 1 line) is stopped by a trigger (functional check).
When trying to delete a 2nd time a few problems happen

1.) Deletion confirm shows 'do you want to delete the 0 selected rows'
Missing selection
2.) Lines tab does show 0 record, missing the 1 existing line
3.) After confirming delete progress 'Deleting ...' is shown forever

Reloading with F5 'resets' to reproduce issue again
1. Good shipment window
2. Create new record + save
3. Complete the record

Having header in form view:
4a. Try deleting this completed
  -> OK: Error message is shown not allowing to delete it
  -> ERROR: Check lines subtab: "Select a parent record" message is seen
5a. Without navigating to any other record, try to delete it again
  -> ERROR: Message in delete confirmation is incorrect: "Are you sure that you want to delete the 0 selected records?" where it should be "Are you sure that you want to delete the selected record? "
  -> ERROR: deleting popup stays forever due to a js error

Having header in grid view:
4b. Try deleting this completed
  -> OK: Error message is shown not allowing to delete it
  -> ERROR: Check lines subtab: "Select a parent record" message is seen
  -> ERROR: focus from header record is lost not appearing any record as selected in header grid
No tags attached.
related to defect 00263833.0PR14Q4 closed inigosanchez If the delete toolbar button is pushed in the tree grid view, the deleted record is the one selected in the standard grid view. 
has duplicate defect 0035613 closed inigosanchez Deleting pop-up is displayed forever under some circumstances 
related to defect 0035944 closed caristu unresponsive ui after uncaught error in EntityPersistenceEventObserver 
png Selection_003.png (3,581) 2017-08-04 13:52
https://issues.openbravo.com/file_download.php?file_id=10971&type=bug
png

png Selection_004.png (27,020) 2017-08-04 13:52
https://issues.openbravo.com/file_download.php?file_id=10972&type=bug
png
Issue History
2017-08-04 13:51shuehnerNew Issue
2017-08-04 13:51shuehnerAssigned To => platform
2017-08-04 13:51shuehnerModules => Core
2017-08-04 13:51shuehnerTriggers an Emergency Pack => No
2017-08-04 13:52shuehnerFile Added: Selection_002.png
2017-08-04 13:52shuehnerFile Added: Selection_003.png
2017-08-04 13:52shuehnerFile Added: Selection_004.png
2017-08-07 09:31shuehnerFile Deleted: Selection_002.png
2017-08-07 09:38shuehnerNote Added: 0098404
2017-08-07 09:38shuehnerSummaryDeleting completed 'Goods Shipment' fails without giving proper message => 2nd attempt to 'Delete row' after first delete was stopped does not work and shows 'Deleting ...' forever
2017-08-07 09:38shuehnerDescription Updatedbug_revision_view_page.php?rev_id=15608#r15608
2017-08-10 10:15alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15641#r15641
2017-08-10 10:16alostalePrioritynormal => high
2017-08-10 10:16alostaleSeverityminor => major
2017-08-10 10:16alostaleStatusnew => acknowledged
2017-08-10 10:18alostaleRelationship addedrelated to 0035613
2017-08-11 11:07alostaleRelationship addedrelated to 0035944
2017-08-18 13:58inigosanchezStatusacknowledged => scheduled
2017-08-18 13:58inigosanchezAssigned Toplatform => inigosanchez
2017-09-08 00:56hgbotCheckin
2017-09-08 00:56hgbotNote Added: 0098891
2017-09-08 00:56hgbotStatusscheduled => resolved
2017-09-08 00:56hgbotResolutionopen => fixed
2017-09-08 00:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6d788e3208b2a7147c102c6ea6dcef8898354ae [^]
2017-09-08 00:58inigosanchezRelationship replacedhas duplicate 0035613
2017-09-08 13:28alostaleReview Assigned To => caristu
2017-09-12 10:17alostaleRelationship addedrelated to 0026383
2017-09-12 10:37alostaleNote Added: 0098971
2017-09-12 10:37alostaleStatusresolved => new
2017-09-12 10:37alostaleResolutionfixed => open
2017-09-12 17:25inigosanchezStatusnew => scheduled
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099368
2017-09-22 11:48hgbotCheckin
2017-09-22 11:48hgbotNote Added: 0099476
2017-09-22 11:48hgbotStatusscheduled => resolved
2017-09-22 11:48hgbotResolutionopen => fixed
2017-09-22 11:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/a6d788e3208b2a7147c102c6ea6dcef8898354ae [^] => http://code.openbravo.com/erp/devel/pi/rev/5a1da485df6bfc4a1aeed218059e46a1ca7d67f2 [^]
2017-09-22 18:28hudsonbotCheckin
2017-09-22 18:28hudsonbotNote Added: 0099502
2017-09-27 09:15caristuNote Added: 0099617
2017-09-27 09:15caristuStatusresolved => closed
2017-09-27 09:15caristuFixed in Version => 3.0PR17Q4

Notes
(0098404)
shuehner   
2017-08-07 09:38   
Update issue to as first item reproduced did only happen because of some non-standard debugging code in my env. So only kept real bug reproducible in pi
(0098891)
hgbot   
2017-09-08 00:56   
Repository: erp/devel/pi
Changeset: a6d788e3208b2a7147c102c6ea6dcef8898354ae
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 08 00:55:48 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6d788e3208b2a7147c102c6ea6dcef8898354ae [^]

Fixed issue 36611: Selection is lost when an error is raised removing a record

When were removing a row and an error was raised (e.g. Deleting a already processed "Good Shipment" is stopped
by a trigger) the selection of the record was lost. This generates an inconsistent grid state that creates all
the reported problems.

The problem is fixed by take into account the described situation removing the deselectAllRecords method because
it has no sense to remove the selection if it is not possible to know if the removed process ends succesfully.
Now the selection is maintained if the record can't be removed properly.

Now the selection is maintained if the record can't be removed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0098971)
alostale   
2017-09-12 10:37   
Reopening while testing:

Now exceptional case (failed deletion) is properly handled, but not common case (succesful deletion).

Use case:

1. Create a sales order in grid mode
2. Delete it: successfully deleted
   -> Check that incorrectly:
      * In grid's top bar 1 record stills appear to be select although there is no actual selection in grid
      * Toolbar buttons (both common ones such as delete, etc. and orange ones in right side) are active
(0099368)
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
(0099476)
hgbot   
2017-09-22 11:48   
Repository: erp/devel/pi
Changeset: 5a1da485df6bfc4a1aeed218059e46a1ca7d67f2
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Sep 22 11:28:57 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5a1da485df6bfc4a1aeed218059e46a1ca7d67f2 [^]

Fixed issue 36611: Selection is lost when an error is raised removing a record

Backout changeset a6d788e3208b because some problems appears in the common case (succesful deletion). It is decided to fix the most uncommon case (failed deletion) by recovering the selection when the deletion fails.

As mentioned in the original fix, when were removing a row and an error was raising (e.g. Deleting a already processed "Good Shipment" is stopped by a trigger) the selection of the record was lost. This generates an inconsistent grid state that creates all
the reported problems.

Now the problem is fixed by take into account the described situation recovering the selection when the deletion fails. Now the selection is maintained if the record can't be removed properly.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0099502)
hudsonbot   
2017-09-22 18:28   
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/b4329e391b82 [^]
Maturity status: Test
(0099617)
caristu   
2017-09-27 09:15   
Code reviewed + tested OK.