Openbravo Issue Tracking System - Modules
View Issue Details
0033833ModulesProduct Catalogspublic2016-08-28 14:492017-06-28 01:31
rqueralta 
inigosanchez 
highmajoralways
closedfixed 
5
 
 
caristu
0033833: Products can not be added to node from popup
When we added products from the popup, this never closes and the selected products are not added.
Download the last version of Product Catalogs. Install it.
1. Create a new catalog in form view.
2. Create 2 summary level nodes and 2 non summary level nodes.
   -Summary Level Nodes: SLN1 and SLN2
   -Non Summary Level: NSLN1 and NSLN2
3. Click on manage catalog.
4. Assign the non summary level node NSLN1 to SLN1 and NSLN2 by drag and drop operation.
5. Add products to the non summary level node: NSLN1. To do that:
   -Select NSLN1 node on the tree and right click on it.
   -Select "Add Products" option. Popup with Product selector will be opened.
   -Click on the search button. Select any product in the grid.
6. Try to add the selected product and press OK.

Popup is not closed and log shows the following error:
 
[http-8080-1] ERROR org.openbravo.userinterface.selector.SelectorDataSourceFilter - Error executing filter: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
                at java.util.ArrayList.rangeCheck(ArrayList.java:635)
                at java.util.ArrayList.get(ArrayList.java:411)
                at org.openbravo.userinterface.selector.SelectorDataSourceFilter.doFilter(SelectorDataSourceFilter.java:103)
                at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:222)
                at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:826)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
                at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
                at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:431)
                at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
                at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:58)
                at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:149)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
                at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
                at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
                at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
                at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                at java.lang.Thread.run(Thread.java:745)
No tags attached.
related to defect 0033491 closed rqueralta Product catalog : Manage Catalog does not get updated after drag and drop 
related to defect 0036289 new Triage Omni OMS An exception is thrown when it is opened a Manage Catalog process from the grid view 
related to defect 0036365 new Triage Omni OMS Product selector in manage catalogs does not work if the context is different from 'openbravo' 
diff 33833.diff (2,192) 2017-05-30 18:54
https://issues.openbravo.com/file_download.php?file_id=10815&type=bug
Issue History
2016-08-28 14:49rqueraltaNew Issue
2016-08-28 14:49rqueraltaAssigned To => Triage Finance
2017-04-20 06:22pradeepvarmaIssue Monitored: pradeepvarma
2017-05-18 13:19ngarciaResolution time => 1496872800
2017-05-19 11:32aferrazRelationship addedrelated to 0033491
2017-05-25 16:58aferrazAssigned ToTriage Finance => markmm82
2017-05-29 16:13markmm82Statusnew => scheduled
2017-05-30 01:28markmm82Note Added: 0096998
2017-05-30 18:48aferrazStatusscheduled => feedback
2017-05-30 18:49aferrazStatusfeedback => new
2017-05-30 18:53aferrazNote Added: 0097032
2017-05-30 18:54aferrazFile Added: 33833.diff
2017-05-30 18:54aferrazAssigned Tomarkmm82 => platform
2017-06-16 13:00inigosanchezStatusnew => scheduled
2017-06-16 13:00inigosanchezAssigned Toplatform => inigosanchez
2017-06-20 01:16inigosanchezRelationship addedrelated to 0036289
2017-06-20 01:26inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15379#r15379
2017-06-20 01:27inigosanchezNote Edited: 0096998bug_revision_view_page.php?bugnote_id=0096998#r15381
2017-06-20 01:29inigosanchezReview Assigned To => caristu
2017-06-20 01:34hgbotCheckin
2017-06-20 01:34hgbotNote Added: 0097492
2017-06-20 01:34hgbotStatusscheduled => resolved
2017-06-20 01:34hgbotResolutionopen => fixed
2017-06-20 01:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bf199b193c8373d768f41cea46c6086c6fcbf8ef [^]
2017-06-20 01:34hgbotCheckin
2017-06-20 01:34hgbotNote Added: 0097493
2017-06-20 16:31hudsonbotCheckin
2017-06-20 16:31hudsonbotNote Added: 0097519
2017-06-20 16:31hudsonbotCheckin
2017-06-20 16:31hudsonbotNote Added: 0097520
2017-06-27 20:14hgbotCheckin
2017-06-27 20:14hgbotNote Added: 0097723
2017-06-27 20:15caristuStatusresolved => closed
2017-06-28 01:31hudsonbotCheckin
2017-06-28 01:31hudsonbotNote Added: 0097727
2017-06-28 08:24caristuRelationship addedrelated to 0036365

Notes
(0096998)
markmm82   
2017-05-30 01:28   
(edited on: 2017-06-20 01:27)
Test Plan:
1. Create a new catalog in form view.
2. Create 2 summary level nodes and 2 non summary level nodes.
   -Summary Level Nodes: SLN1 and SLN2
   -Non Summary Level: NSLN1 and NSLN2
3. Click on manage catalog.
4. Assign the non summary level node NSLN1 to SLN1, and NSLN2 to SLN1 by drag and drop operation.
5. Add products to the non summary level node: NSLN1. Following below steps:
   -Select NSLN1 node on the tree and right click on it.
   -Select "Add Products" option. Popup with Product selector will be opened.
   -Click on the search button. Select any product in the grid.
6. Try to add the selected product and press OK.
   Notice the popup is closed and the selected product is now children of NSLN1.
7. Close the Manage catalog popup.
8. Open the created catalog in form view. Go to Node tab and select NSLN2, notice the Add Products button is enables in the catalog header. Go to add products to NSLN2 node.
9. When Add Products popup opens, select two products of the list. Press done.
   Notice the popu is closed and a notice message is shown: "2 products successfully added to NSLN2."
   If you go to manage catalog and open the node NSLN2 you will see the products previously added to it.

(0097032)
aferraz   
2017-05-30 18:53   
Problem is due to some exceptions thrown in ob-parameter-window-form.js and ob-parameter-window-view.js files:

ob-parameter-window-form.js (this.paramWindow.dynamicColumns could be undefined):
affectedParams = this.paramWindow.dynamicColumns[item.name];

ob-parameter-window-view.js (data could be undefined):
if (data.showResultsInProcessView) {

Attached diff with a possible solution.
(0097492)
hgbot   
2017-06-20 01:34   
Repository: erp/devel/pi
Changeset: bf199b193c8373d768f41cea46c6086c6fcbf8ef
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Jun 20 01:31:01 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bf199b193c8373d768f41cea46c6086c6fcbf8ef [^]

Fixed issue 33833: Products can not be added to node from popup

Products can not be added to node from popup because an IndexOutOfBoundsException
is thrown. To avoid this problem a check is added. Besides another check is added
in order to avoid a NPE.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
---
(0097493)
hgbot   
2017-06-20 01:34   
Repository: erp/devel/pi
Changeset: 540e39d059142a64d0877547147e08f8d5531d5d
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Jun 20 01:33:48 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/540e39d059142a64d0877547147e08f8d5531d5d [^]

Related with issue 33833: Applied JSBeautifier properly

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
---
(0097519)
hudsonbot   
2017-06-20 16:31   
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/8518c867b17c [^]
Maturity status: Test
(0097520)
hudsonbot   
2017-06-20 16:31   
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/8518c867b17c [^]
Maturity status: Test
(0097723)
hgbot   
2017-06-27 20:14   
Repository: erp/devel/pi
Changeset: 3f6b96e0cba96c6921f54ab58f4743e9fce1468c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jun 27 20:12:37 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3f6b96e0cba96c6921f54ab58f4743e9fce1468c [^]

related to issue 33833: code review improvements

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
---
(0097727)
hudsonbot   
2017-06-28 01:31   
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/05dd12d60a71 [^]
Maturity status: Test