Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035686Openbravo ERPA. Platformpublic2017-04-04 16:132017-05-29 17:43
inigosanchez 
inigosanchez 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
Production - QA Approved
2016-09-14
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/b23043be4cf63ad3ce1fd35047ece43b4530c3bd [^]
No
0035686: It is not possible to delete a record in tree view
It is not possible to delete a record in tree view. An error is thrown in console:
ISC_Combined.js:1410 Uncaught RangeError: Maximum call stack size exceeded
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneArray [as $361] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3001)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
- Log in as F&B International Group Admin
- Go to [Account Tree] window.
- Select "F&B International Group" record and go to [Element Value] subtab.
- Open tree view by clicking in "Toggle Tree Grid Visibility" button.
- Open PL | Profit & Loss node and select leaf node: Total Other Income (Expense). Delete it.

Note than leaf node is not removed properly. An error is thrown in console.
No tags attached.
depends on backport 00356873.0PR17Q2 closed platform It is not possible to delete a record in tree view 
depends on backport 00356883.0PR17Q1.1 closed inigosanchez It is not possible to delete a record in tree view 
caused by feature request 0033976 closed platform Implement Client Side Event Handler Pre Delete Action 
Issue History
2017-04-04 16:13inigosanchezNew Issue
2017-04-04 16:13inigosanchezAssigned To => platform
2017-04-04 16:13inigosanchezModules => Core
2017-04-04 16:13inigosanchezRegression level => Production - QA Approved
2017-04-04 16:13inigosanchezRegression date => 2016-09-14
2017-04-04 16:13inigosanchezRegression introduced in release => 3.0PR17Q1
2017-04-04 16:13inigosanchezRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/b23043be4cf63ad3ce1fd35047ece43b4530c3bd [^]
2017-04-04 16:13inigosanchezTriggers an Emergency Pack => No
2017-04-04 16:15inigosanchezStatusnew => scheduled
2017-04-04 16:15inigosanchezAssigned Toplatform => inigosanchez
2017-04-04 16:23inigosanchezRelationship addedcaused by 0033976
2017-04-07 09:47inigosanchezReview Assigned To => caristu
2017-04-07 11:28inigosanchezNote Added: 0095895
2017-04-07 11:30inigosanchezNote Edited: 0095895bug_revision_view_page.php?bugnote_id=0095895#r14984
2017-04-07 11:35hgbotCheckin
2017-04-07 11:35hgbotNote Added: 0095896
2017-04-07 11:35hgbotStatusscheduled => resolved
2017-04-07 11:35hgbotResolutionopen => fixed
2017-04-07 11:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd1ddeb9938d10689ab7a7930926091b3b5d2d2f [^]
2017-04-07 11:54inigosanchezNote Edited: 0095895bug_revision_view_page.php?bugnote_id=0095895#r14985
2017-04-10 13:06caristuNote Added: 0095931
2017-04-10 13:06caristuStatusresolved => closed
2017-04-10 13:06caristuFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096871

Notes
(0095895)
inigosanchez   
2017-04-07 11:28   
(edited on: 2017-04-07 11:54)
Added a test in testlink: Platform > [TGV] Tree Grid View > [TGVc] Custom Tree Structure > TGVc020 remove tree nodes

Manual test in account tree:
- Remove an element in tree view.
- Remove an element in grid view.
- Remove two elements in tree view.
- Remove two elements in grid view.

(0095896)
hgbot   
2017-04-07 11:35   
Repository: erp/devel/pi
Changeset: cd1ddeb9938d10689ab7a7930926091b3b5d2d2f
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Apr 07 11:33:44 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd1ddeb9938d10689ab7a7930926091b3b5d2d2f [^]

Fixed issue 35686: It is not possible to delete a record in tree view

The problem was related with Pre Delete Client Side Event Handler. The problem was
that a isc.clone method didn't work as expected. isc.clone method create a deep
clone of an object that can be edited without affecting the original but does not
handle looping references (will infinite loop). For this reason, in case of clone
currentGrid.getSelection() object in tree view an error was thrown.

In order to fix this problem, isc.shallowClone is used instead of isc.clone. This
method handle looping references properly.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0095931)
caristu   
2017-04-10 13:06   
Code review + testing OK.
(0096871)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test