Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041232Openbravo ERP09. Financial managementpublic2019-07-02 15:432019-08-22 14:44
shuehner 
collazoandy4 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q43.0PR19Q4 
dmiguelez
Core
No
0041232: AdvPaymentMngtDao is not using bind-params
This code is not using bind-params:
  public List<FIN_PaymentScheduleDetail> getInvoicePendingScheduledPaymentDetails(Invoice invoice) {

      whereClause.append(" as psd ");
      whereClause.append(" where psd.");
      whereClause.append(FIN_PaymentScheduleDetail.PROPERTY_PAYMENTDETAILS);
      whereClause.append(" is null");
      whereClause.append(" and psd.");
      whereClause.append(FIN_PaymentScheduleDetail.PROPERTY_INVOICEPAYMENTSCHEDULE);
      whereClause.append(".");
      whereClause.append(FIN_PaymentSchedule.PROPERTY_INVOICE);
      whereClause.append(".id = '");
      whereClause.append(invoice.getId());
      whereClause.append("'");
      whereClause.append(" order by psd.");
      whereClause.append(FIN_PaymentScheduleDetail.PROPERTY_INVOICEPAYMENTSCHEDULE);
      whereClause.append(".");
      whereClause.append(FIN_PaymentSchedule.PROPERTY_EXPECTEDDATE);
      whereClause.append(", psd.");
      whereClause.append(FIN_PaymentScheduleDetail.PROPERTY_AMOUNT);
-
When fixing please fix all 6 HQL StringBuilder/Buffer to be new style (constant string)
No tags attached.
related to defect 0041425 closed AtulOpenbravo Unused methods in AdvPaymentMngtDao.java 
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-07-02 15:43shuehnerNew Issue
2019-07-02 15:43shuehnerAssigned To => Triage Finance
2019-07-02 15:43shuehnerModules => Core
2019-07-02 15:43shuehnerTriggers an Emergency Pack => No
2019-07-02 15:43shuehnerRelationship addedblocks 0038136
2019-07-04 12:14shuehnerTarget Version => 3.0PR19Q4
2019-07-17 06:37collazoandy4Assigned ToTriage Finance => collazoandy4
2019-07-17 06:41collazoandy4Statusnew => scheduled
2019-07-18 06:40collazoandy4Note Added: 0113489
2019-07-18 17:16dmiguelezNote Edited: 0113489bug_revision_view_page.php?bugnote_id=0113489#r19154
2019-07-18 17:16dmiguelezNote Edited: 0113489bug_revision_view_page.php?bugnote_id=0113489#r19155
2019-07-18 17:20hgbotCheckin
2019-07-18 17:20hgbotNote Added: 0113532
2019-07-18 17:20hgbotStatusscheduled => resolved
2019-07-18 17:20hgbotResolutionopen => fixed
2019-07-18 17:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5ff225ecb09813ede2230a34369dfbada89823ca [^]
2019-07-18 17:21dmiguelezReview Assigned To => dmiguelez
2019-07-18 17:21dmiguelezNote Added: 0113533
2019-07-18 17:21dmiguelezStatusresolved => closed
2019-07-18 17:21dmiguelezFixed in Version => 3.0PR19Q4
2019-07-22 22:09collazoandy4Relationship addedrelated to 0041425
2019-08-22 14:44hudsonbotCheckin
2019-08-22 14:44hudsonbotNote Added: 0114163

Notes
(0113489)
collazoandy4   
2019-07-18 06:40   
(edited on: 2019-07-18 17:16)
Test Plan
  Create a non paid invoice
  Go to Payment Proposal window and create a new record
    Click on Select Expected Payments and select one record
    Click on Generate Payment and check the process ends without error

(0113532)
hgbot   
2019-07-18 17:20   
Repository: erp/devel/pi
Changeset: 5ff225ecb09813ede2230a34369dfbada89823ca
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu Jul 18 16:31:42 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5ff225ecb09813ede2230a34369dfbada89823ca [^]

Fixes issue 41232: AdvPaymentMngtDao is not using bind-params

Use bind params in HQL queries

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0113533)
dmiguelez   
2019-07-18 17:21   
Code Review + Testing Ok
(0114163)
hudsonbot   
2019-08-22 14:44   
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/ad3efd3bd07c [^]
Maturity status: Test