Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034886Retail ModulesWeb POSpublic2017-01-10 12:052017-01-13 12:36
Asantos9 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR17Q2 
marvintm
No
0034886: [SERQA 2284] setParameterValues is not checking properly when it has to be set a parameter
SetParameterValues in ProcessHQLQuery is not checking correctly when the parameter has to be set.

if (!ArrayUtils.contains(query.getNamedParameters(), paramName)) {
  continue;
}

This statement fails when the parameter name is not put in the hql query correctly because the query could have a substring with the same paramName value.
- Install order preparation module
- Log into Web POS
- Click on menu
- Select order preparation
- Filter by customer
- Select a customer
- Click on search button

Note that an exception is thrown with the next information:

org.openbravo.base.exception.OBException: Error when converting value 4D55D6DC1B35895E3DB24C57E1D6F8A0
Now, it is checking if the query as string contains the parameter, but it has to check if the name parameters array of the query has the parameter.

if (!ArrayUtils.contains(query.getNamedParameters(), paramName)) {
  continue;
}
No tags attached.
Issue History
2017-01-10 12:05Asantos9New Issue
2017-01-10 12:05Asantos9Assigned To => Retail
2017-01-10 12:05Asantos9Triggers an Emergency Pack => No
2017-01-10 12:45xabiermerinoResolution time => 1485212400
2017-01-10 12:45xabiermerinoSummarysetParameterValues is not checking properly when it has to be set a parameter => [SERQA 2284] setParameterValues is not checking properly when it has to be set a parameter
2017-01-12 13:52marvintmSeverityminor => major
2017-01-12 13:55ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-01-12 13:55ranjith_qualiantech_comStatusnew => scheduled
2017-01-13 10:45hgbotCheckin
2017-01-13 10:45hgbotNote Added: 0093475
2017-01-13 10:45hgbotStatusscheduled => resolved
2017-01-13 10:45hgbotResolutionopen => fixed
2017-01-13 10:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0341cbbaf0aa2548648c90c4d49696f60bdcd051 [^]
2017-01-13 12:36marvintmReview Assigned To => marvintm
2017-01-13 12:36marvintmStatusresolved => closed
2017-01-13 12:36marvintmFixed in Version => RR17Q2

Notes
(0093475)
hgbot   
2017-01-13 10:45   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0341cbbaf0aa2548648c90c4d49696f60bdcd051
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 13 15:15:27 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0341cbbaf0aa2548648c90c4d49696f60bdcd051 [^]

Fixes issue 34886 : Changes in Parameter validation

* parameterValues should be checked with query named parameters instead of query

---
M src/org/openbravo/mobile/core/process/ProcessHQLQuery.java
---