Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040574Openbravo ERP05. Production managementpublic2019-04-10 11:412019-06-05 20:54
shuehner 
nonofrancisco 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q33.0PR19Q3 
Sandrahuguet
Core
No
0040574: SequenceProductCreate.getLineNum is not using bind-parameters
This code is not using bind-params:

    String hql = " SELECT COALESCE(MAX(l.lineNo),0)+10 AS DefaultValue FROM ManufacturingOperationProduct l WHERE l.mASequence.id= '"
        + SequenceId + "'";
    Query<Long> q = OBDal.getInstance().getSession().createQuery(hql, Long.class);
-
No tags attached.
depends on backport 00408323.0PR19Q2.1 closed nonofrancisco SequenceProductCreate.getLineNum is not using bind-parameters 
depends on backport 00408333.0PR19Q1.2 closed nonofrancisco SequenceProductCreate.getLineNum is not using bind-parameters 
blocks design defect 0038136 acknowledged Triage Platform Base Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 
Issue History
2019-04-10 11:41shuehnerNew Issue
2019-04-10 11:41shuehnerAssigned To => Triage Finance
2019-04-10 11:41shuehnerModules => Core
2019-04-10 11:41shuehnerTriggers an Emergency Pack => No
2019-04-10 11:41shuehnerRelationship addedblocks 0038136
2019-05-02 05:24nonofranciscoStatusnew => scheduled
2019-05-03 11:58SandrahuguetAssigned ToTriage Finance => nonofrancisco
2019-05-09 23:24nonofranciscoStatusscheduled => acknowledged
2019-05-09 23:25nonofranciscoStatusacknowledged => scheduled
2019-05-09 23:45nonofranciscoNote Added: 0111608
2019-05-13 12:37shuehnerTarget Version => 3.0PR19Q3
2019-06-05 13:11hgbotCheckin
2019-06-05 13:11hgbotNote Added: 0112417
2019-06-05 13:11hgbotStatusscheduled => resolved
2019-06-05 13:11hgbotResolutionopen => fixed
2019-06-05 13:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/014ef9ca9806dd5d349dd2b31293a6ffc271e5d6 [^]
2019-06-05 15:54SandrahuguetReview Assigned To => Sandrahuguet
2019-06-05 15:54SandrahuguetNote Added: 0112429
2019-06-05 15:54SandrahuguetStatusresolved => closed
2019-06-05 15:54SandrahuguetFixed in Version => 3.0PR19Q3
2019-06-05 20:54hudsonbotCheckin
2019-06-05 20:54hudsonbotNote Added: 0112444

Notes
(0111608)
nonofrancisco   
2019-05-09 23:45   
Test Plan

As Openbravo/F&B International Group Admin

Open Activity window
Create a new record

Open Product window
Create a new record
Set production = true

Open Process Plan window
Create a new record
Go to Version tab
Create a new record
Go to Operations tab
Create a new record
Set Activity to the previously created one
Go to I/O Products tab
Create a new record
Set product to the previously created one
Click on Create Product Copy button
Accept default values
Verify a new product is created with line number 20
(0112417)
hgbot   
2019-06-05 13:11   
Repository: erp/devel/pi
Changeset: 014ef9ca9806dd5d349dd2b31293a6ffc271e5d6
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Wed May 01 22:53:24 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/014ef9ca9806dd5d349dd2b31293a6ffc271e5d6 [^]

Fixes issue 40574: Uses bind parameter.

Instead of string concatenation, bind parameter is used to build the query.

---
M src/org/openbravo/erpCommon/ad_actionButton/SequenceProductCreate.java
---
(0112429)
Sandrahuguet   
2019-06-05 15:54   
code review + testing ok
(0112444)
hudsonbot   
2019-06-05 20:54   
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/a8037910e3ad [^]
Maturity status: Test