Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041199Openbravo ERP09. Financial managementpublic2019-06-27 18:092019-08-22 14:44
shuehner 
collazoandy4 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q43.0PR19Q4 
dmiguelez
Core
No
0041199: PaymentReportDao is not using bind-param
Several cases in that file are not using bind-param both for simple values i.e. here:
          hsqlScript.append(" and fpsd.");
          hsqlScript.append(FIN_PaymentScheduleDetail.PROPERTY_ORGANIZATION);
          hsqlScript.append(".id = '");
          hsqlScript.append(strOrg);
          hsqlScript.append("'");

as well as for list of values in in-clauses:
          hsqlScript.append(".id in ('");
          Set<String> orgChildTree = OBContext.getOBContext()
              .getOrganizationStructureProvider()
              .getChildTree(strOrg, true);
          Iterator<String> orgChildTreeIter = orgChildTree.iterator();
          while (orgChildTreeIter.hasNext()) {
            hsqlScript.append(orgChildTreeIter.next());
            orgChildTreeIter.remove();
            hsqlScript.append("'");
            if (orgChildTreeIter.hasNext()) {
              hsqlScript.append(", '");
            }
          }
          hsqlScript.append(")");
        }


Note: that setParameterList can be easily use to pass value lists directly see issue 40580 for an example
-
No tags attached.
depends on backport 00412583.0PR19Q3 closed Triage Omni OMS PaymentReportDao is not using bind-param 
depends on backport 00412593.0PR19Q2.1 closed collazoandy4 PaymentReportDao is not using bind-param 
depends on backport 00412603.0PR19Q1.3 closed Triage Omni OMS PaymentReportDao is not using bind-param 
related to defect 0041302 closed collazoandy4 Apply HQL style guide to PaymentReportDao 
related to defect 0041423 closed AtulOpenbravo The method getInvoicePaymentSchedule of PaymentReportDao.java is not used 
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-06-27 18:09shuehnerNew Issue
2019-06-27 18:09shuehnerAssigned To => Triage Finance
2019-06-27 18:09shuehnerModules => Core
2019-06-27 18:09shuehnerTriggers an Emergency Pack => No
2019-06-27 18:10shuehnerRelationship addedblocks 0032688
2019-06-27 18:12shuehnerNote Added: 0113074
2019-07-02 15:39shuehnerRelationship addedblocks 0038136
2019-07-02 15:39shuehnerRelationship deletedblocks 0032688
2019-07-03 17:00shuehnerStatusnew => scheduled
2019-07-03 17:00shuehnerTarget Version => 3.0PR19Q4
2019-07-04 17:48SandrahuguetAssigned ToTriage Finance => collazoandy4
2019-07-09 17:14SandrahuguetAssigned Tocollazoandy4 => AtulOpenbravo
2019-07-09 17:47SandrahuguetAssigned ToAtulOpenbravo => collazoandy4
2019-07-11 15:11SandrahuguetRelationship addedrelated to 0041302
2019-07-12 06:34collazoandy4Note Added: 0113319
2019-07-16 16:39hgbotCheckin
2019-07-16 16:39hgbotNote Added: 0113430
2019-07-16 16:39hgbotStatusscheduled => resolved
2019-07-16 16:39hgbotResolutionopen => fixed
2019-07-16 16:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9352c35d828c9dcbc1e5e358b0e5cbd5c156e033 [^]
2019-07-16 16:43dmiguelezReview Assigned To => dmiguelez
2019-07-16 16:43dmiguelezNote Added: 0113439
2019-07-16 16:43dmiguelezStatusresolved => closed
2019-07-16 16:43dmiguelezFixed in Version => 3.0PR19Q4
2019-07-22 22:13collazoandy4Relationship addedrelated to 0041423
2019-08-22 14:44hudsonbotCheckin
2019-08-22 14:44hudsonbotNote Added: 0114151

Notes
(0113074)
shuehner   
2019-06-27 18:12   
1 method to be fixed (getInvoicePaymentSchedule) is already marked as deprecated. It could be useful to check if it can be removed (api-change) instead of working on fixing it.
(0113319)
collazoandy4   
2019-07-12 06:34   
Test Plan
  Go to Payment Report and fill out the filters:
    Organization: F&B EspaƱa, S.A
    BP: Alimentos y Supermercados, S.A
    BP Category: Customer - Tier 1
    Status: Payment Cleared
    Payment Method: Transferencia
    Currency: EUR
    Financial Account: Cuenta de Banco - EUR
    Grouping Criteria: Business Partner
    Orden Criteria: Date, Businness Partner Category
  Execute the report and check the process ends without error and records are shown
  Fill out the missing filters and check no error is shown in the report
(0113430)
hgbot   
2019-07-16 16:39   
Repository: erp/devel/pi
Changeset: 9352c35d828c9dcbc1e5e358b0e5cbd5c156e033
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jul 16 11:52:27 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9352c35d828c9dcbc1e5e358b0e5cbd5c156e033 [^]

Fixes issue 41199: PaymentReportDao is not using bind-param

Applied bind-params in getPaymentReport method

---
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
---
(0113439)
dmiguelez   
2019-07-16 16:43   
Code Review + Testing Ok
(0114151)
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