Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027848Openbravo ERP04. Warehouse managementpublic2014-10-13 11:322016-04-08 11:00
AugustoMauch 
reinaldoguerra 
immediateminorhave not tried
closedfixed 
5
 
 
aferraz
Core
Production - Confirmed Stable
2014-02-20
3.0PR14Q2
https://code.openbravo.com/erp/devel/pi/rev/0b033ca5bd1b08e81a30cfdbab2b459549d8c17c [^]
No
0027848: Not possible to select more than one value in fk filter drop down on Manage Stock
In the pick and execute window of Manage Stock it is not possible to select two records in the filter drop down of the foreign key columns. Selecting one value works, but if two are selected no values are returned and this exception is shown in the log:

java.lang.ClassCastException: org.codehaus.jettison.json.JSONArray cannot be cast to org.codehaus.jettison.json.JSONObject
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.getFilteredAttribute(StockReservationPickAndEditDataSource.java:702)
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.getGridData(StockReservationPickAndEditDataSource.java:560)
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.getData(StockReservationPickAndEditDataSource.java:130)
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.fetchJSONObject(StockReservationPickAndEditDataSource.java:102)
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.fetch(StockReservationPickAndEditDataSource.java:82)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:261)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:744)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:449)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:92)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:140)
    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:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:701)
Login as group admin:
1. Go to preference window and set the preference Enable Stock Reservations = Y
2. Go to Stock Reservation window and create a new record:
Org= F&B España - Región Norte
Product= Zumo de Naranja Bio 0,33L
Qty= 10
Warehouse= España Región Norte
3. Click on Manage Stock. A P&E is shown with several records.
4. Select several values in the Attribute Set Value filter drop down. No records will be returned.
Manual P&E
related to defect 0027788 closed AugustoMauch Filters don't work properly on Manage Stock 
depends on backport 00294473.0PR15Q1.3 closed reinaldoguerra Not possible to select more than one value in fk filter drop down on Manage Stock 
caused by design defect 0023412 closed Sandrahuguet Manage Stock Pick and Execute Window does not work with large amount of data 
related to defect 00289073.0PR15Q3 closed reinaldoguerra Cannot filter the Manage Reservation Stock pop-up of Sales Order window 
Issue History
2014-10-13 11:32AugustoMauchNew Issue
2014-10-13 11:32AugustoMauchAssigned To => Sandrahuguet
2014-10-13 11:32AugustoMauchModules => Core
2014-10-13 11:32AugustoMauchTriggers an Emergency Pack => No
2014-10-13 11:33AugustoMauchTag Attached: Manual P&E
2014-10-13 11:33AugustoMauchRelationship addedrelated to 0027788
2014-10-13 11:36AugustoMauchRegression level => Production - Confirmed Stable
2014-10-13 11:36AugustoMauchRegression introduced in release => 3.0PR14Q2
2014-10-13 11:36AugustoMauchPrioritynormal => immediate
2015-02-10 12:42ngarciaRelationship addedrelated to 0028907
2015-03-17 05:18reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2015-03-17 05:18reinaldoguerraStatusnew => scheduled
2015-03-17 14:35reinaldoguerraNote Added: 0075690
2015-03-23 12:23aferrazRegression date => 2014-02-20
2015-03-23 12:23aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/0b033ca5bd1b08e81a30cfdbab2b459549d8c17c [^]
2015-03-24 18:21aferrazRelationship addedcaused by 0023412
2015-03-27 08:33hgbotCheckin
2015-03-27 08:33hgbotNote Added: 0076051
2015-03-27 08:33hgbotStatusscheduled => resolved
2015-03-27 08:33hgbotResolutionopen => fixed
2015-03-27 08:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4f00f31f65e1024bf0a9e985297f8bef5746b68f [^]
2015-03-27 08:35aferrazReview Assigned To => aferraz
2015-03-27 08:35aferrazNote Added: 0076054
2015-03-27 08:35aferrazStatusresolved => closed
2015-03-27 14:47aferrazStatusclosed => new
2015-03-27 14:47aferrazResolutionfixed => open
2015-03-27 14:48aferrazStatusnew => scheduled
2015-03-27 14:48aferrazStatusscheduled => resolved
2015-03-27 14:48aferrazResolutionopen => fixed
2015-03-27 14:48aferrazStatusresolved => closed
2015-03-27 15:58hudsonbotCheckin
2015-03-27 15:58hudsonbotNote Added: 0076097
2015-04-22 09:45SandrahuguetNote Added: 0076673
2016-04-08 11:00hgbotCheckin
2016-04-08 11:00hgbotNote Added: 0085524

Notes
(0075690)
reinaldoguerra   
2015-03-17 14:35   
Test plan used:
1- Login into Openbravo ERP
2- As group admin role, set the Enable Stock Reservation preference to 'Y'
3- Logout and login again
4- Go to Product window and create a new one for F&B España, S.A organization
5- Go to Price tab and create a new record with Tarifa de Ventas as Price List Version
6- Go to Goods Receipt window and create new header for F&B España - Región Norte
7- Go to lines tab and create a new record selecting created product, enter a Movement Quantity. Complete it
8- Repeat steps 6 and 7 now for F&B España - Región Sur organization
9- Go to Stock Reservation window and create a new header for F&B España, S.A. Also select created product. Do not select any Warehouse.
10- Click on Manage Stock button. A P&E is shown with 2 records, one for Región Norte and the other for Región Sur
11- Select more than one filter and the note that now the grid is filtered correctly.
(0076051)
hgbot   
2015-03-27 08:33   
Repository: erp/devel/pi
Changeset: 4f00f31f65e1024bf0a9e985297f8bef5746b68f
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Mar 25 12:25:21 2015 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/4f00f31f65e1024bf0a9e985297f8bef5746b68f [^]

Fixed bug 28907, fixed bug 27848, fixed bug 29003

The following changes was made in Stock Reservation pick and edit:
When filters are executed, a Reservation entity is created from the json parameter "@MaterialMgmtReservation.id@". This works fine when the pop-up is called from Stock Reservation window, but from Sales Order, this parameter does not exists, and the filter process fails. Now is included a code line that puts a "@MaterialMgmtReservation.id@" into the json parameters before the filters are applied.
Array critera filtering was bad created when getting grid's data, so was changed, to allow filter's multiple selection.
An hibernate exception is launched when typing wrong filters and the expression "in ()" is included in the query to be executed. So this expression was replaced by one which returns a false value: "1 = 2".
Were included also, changes to allow filtering quantity's column. Other changes were included to avoid exceptions comparing to null values.

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0076054)
aferraz   
2015-03-27 08:35   
Code review + Testing OK
(0076097)
hudsonbot   
2015-03-27 15:58   
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/9e2f5d600634 [^]
Maturity status: Test
(0076673)
Sandrahuguet   
2015-04-22 09:45   
Test added in testlink

https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-8203 [^]
(0085524)
hgbot   
2016-04-08 11:00   
Repository: tools/automation/int
Changeset: 777758126bdbe2cf3cc1a64d0f98ffc75330734c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Feb 26 08:46:30 2016 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/777758126bdbe2cf3cc1a64d0f98ffc75330734c [^]

Related to issue 28907 & Related to issue 27848 & Related to issue 29003: Add an automated test

---
M src-test/com/openbravo/test/integration/erp/data/sales/transactions/salesorder/ManageReservationData.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesorder/LinesTab.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/pickandexecute/PickAndExecuteWindow.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RES_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesOrder.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RESRegression28907R27848R29003.java
---