Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032153Openbravo ERPA. Platformpublic2016-02-05 15:102016-08-30 12:42
lorenzofidalgo 
NaroaIriarte 
normalmajorsometimes
closedfixed 
5
main 
3.0PR16Q4 
alostale
Google Chrome
Core
No
0032153: [RR16Q1] "Update Characteristics" process does not show characteristics to choose them after creating a new record
After creating a new record in "Characteristics" tab, it is sometimes impossible to choose a characteristic value to the just created characteristic. It is stuck in "No items to show".
1-Login POS backend as Openbravo and go to "Product" window.
2-Select a product with a few invariants (ie. Alpine skiing backpack 27 L) and go to "Characteristics" tab
3-Click "Update Characteristics" process.
4-Quickly after previous step, click dropdown arrow and check "No items to show" appear.

With browser's dev tools tools you can check:
* Just after step 3, many identical requests are executed to create new datasources (up to 4 per invariant)
* If step 4 is executed before the request to create the datasource for selected combo, the defined problem appears. In this case, the following js error can be seen in console:
ISC_Combined.js:12243 Uncaught TypeError: Cannot read property 'resultTreeClass' of undefinedisc_Canvas_createResultTree
  @ ISC_Combined.js:12243isc_TreeGrid_createDataModel
  @ ISC_Combined.js:12310isc_Canvas_filterWithCriteria
  @ ISC_Combined.js:2688isc_c_Class_invokeSuper
  @ ISC_Combined.js:245isc_c_Class_Super
  @ ISC_Combined.js:237isc_TreeGrid_filterWithCriteria
  @ ISC_Combined.js:12312isc_Canvas__filter
  @ ISC_Combined.js:2687isc_c_Class_invokeSuper
  @ ISC_Combined.js:245isc_c_Class_Super
  @ ISC_Combined.js:237isc_ListGrid__filter
  @ ISC_Combined.js:6307isc_Canvas_fetchData
  @ ISC_Combined.js:2659isc_c_Class_invokeSuper
  @ ISC_Combined.js:245isc_c_Class_Super
  @ ISC_Combined.js:237isc_ListGrid_fetchData
  @ ISC_Combined.js:6044isc_c_Class_invokeSuper
  @ ISC_Combined.js:245isc_c_Class_Super
  @ ISC_Combined.js:237isc.OBTreeItemTree.addProperties.fetchData
  @ 1f025b6….js:1281isc.OBTreeItemTree.addProperties.show
  @ 1f025b6….js:1272tree.show
  @ 1f025b6….js:2929isc.OBTreeItem.addProperties.toggleTreePicker
  @ 1f025b6….js:1265isc.OBTreeItem.addProperties.showPicker
  @ 1f025b6….js:1265isc.A.pickerIconDefaults.click
  @ ISC_Combined.js:8298isc_FormItem__iconClick
  @ ISC_Combined.js:8699isc_DynamicForm_handleClick
  @ ISC_Combined.js:8198isc_c_EventHandler_bubbleEvent
  @ ISC_Combined.js:1336isc_c_EventHandler_handleClick
  @ ISC_Combined.js:1202isc_c_EventHandler__handleMouseUp
  @ ISC_Combined.js:1191isc_c_EventHandler_handleMouseUp
  @ ISC_Combined.js:1185isc_c_EventHandler_dispatch
  @ ISC_Combined.js:1410(anonymous function)
Performance
related to feature request 0027490 closed rafademiguel Display in product form view hierarchy of the characteristics and the description just for one level 
related to defect 0039227 closed caristu Error with tree reference fields in the form personalization button 
png UpdateCharacteristics.png (152,445) 2016-02-05 15:10
https://issues.openbravo.com/file_download.php?file_id=9032&type=bug
png

png Selection_057.png (132,151) 2016-02-26 10:21
https://issues.openbravo.com/file_download.php?file_id=9114&type=bug
png
Issue History
2016-02-05 15:10lorenzofidalgoNew Issue
2016-02-05 15:10lorenzofidalgoAssigned To => platform
2016-02-05 15:10lorenzofidalgoFile Added: UpdateCharacteristics.png
2016-02-05 15:10lorenzofidalgoWeb browser => Google Chrome
2016-02-05 15:10lorenzofidalgoModules => Core
2016-02-05 15:10lorenzofidalgoTriggers an Emergency Pack => No
2016-02-25 14:36alostaleNote Added: 0084511
2016-02-25 14:36alostaleAssigned Toplatform => lorenzofidalgo
2016-02-25 14:36alostaleStatusnew => feedback
2016-02-26 10:20alostaleWeb browserGoogle Chrome => Google Chrome
2016-02-26 10:20alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11263#r11263
2016-02-26 10:21alostaleFile Added: Selection_057.png
2016-02-26 10:21alostaleAssigned Tolorenzofidalgo => platform
2016-02-26 10:21alostaleStatusfeedback => new
2016-02-26 10:22alostaleStatusnew => acknowledged
2016-02-26 12:01alostaleRelationship addedrelated to 0027490
2016-02-26 12:07alostaleNote Added: 0084559
2016-06-23 10:11NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-07-07 09:11NaroaIriarteStatusacknowledged => scheduled
2016-08-29 09:31hgbotCheckin
2016-08-29 09:31hgbotNote Added: 0089480
2016-08-29 09:31hgbotStatusscheduled => resolved
2016-08-29 09:31hgbotResolutionopen => fixed
2016-08-29 09:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f945e4c7788eb722cc9e08edbce0bc173e4f3650 [^]
2016-08-29 21:02hudsonbotCheckin
2016-08-29 21:02hudsonbotNote Added: 0089518
2016-08-30 12:39alostaleTag Attached: Performance
2016-08-30 12:42alostaleReview Assigned To => alostale
2016-08-30 12:42alostaleNote Added: 0089550
2016-08-30 12:42alostaleStatusresolved => closed
2016-08-30 12:42alostaleFixed in Version => 3.0PR16Q4
2018-09-10 10:00caristuRelationship addedrelated to 0039227

Notes
(0084511)
alostale   
2016-02-25 14:36   
I can't reproduce the issue locally neither in live.builds.

Can you provide more information about the environment you reproduce it?

Also it would be useful to get:
  - openbravo.log if something appears there
  - js errors if any
  - request performed when opening the drop down, with the time it took and response
(0084559)
alostale   
2016-02-26 12:07   
4 requests to create datasource are executed for each field shown in the popup. Duplication is caused by [1], where there are two invocations to super, each of them result in 2 calls for ds creation.

[1] https://code.openbravo.com/erp/devel/pi/file/fd863146a4f4/web/js/productCharacteristicsProcess.js#l171 [^]
(0089480)
hgbot   
2016-08-29 09:31   
Repository: erp/devel/pi
Changeset: f945e4c7788eb722cc9e08edbce0bc173e4f3650
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Aug 23 16:15:02 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f945e4c7788eb722cc9e08edbce0bc173e4f3650 [^]

Fixed issue 32153: Update Characteristic process was not working fine

There were 4 request to create datasources for each characteristic, this was happening on one hand because there were two calls to the super and also because call to OB.Datasource.get() was being executed in two different places. Removing the duplicated super fixed part of the problem, to fix the other part, now a condition has been added in the ob-tree-item class. This condition checks if there is a concrete property (showPopupIconWindow) set to false. If it is set to false the magnifying glass icon will not be created and the OBTreeItemPopupWindow neither, so the uneeded call to the OB.Datasource.get() will not be done.
There was another problem also, if the dropdown of a characteristic was clicked before the creation of the datasource, it was showing the message "No items to show" and a js error in the console. To fix this, a condition has been added. The condition checks if there exists a datasource and clicking the dropdown will not work until a datasource exist.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-tree.js
M web/js/productCharacteristicsProcess.js
---
(0089518)
hudsonbot   
2016-08-29 21:02   
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/bc86301d6ff4 [^]
Maturity status: Test
(0089550)
alostale   
2016-08-30 12:42   
code reviewed

Tested in update characteristics popup as well as in tree reference selector drop down and popup.