Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041199
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajorhave not tried2019-06-27 18:092019-08-22 14:44
ReportershuehnerView Statuspublic 
Assigned Tocollazoandy4 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q4
StatusclosedFix in branchFixed in SCM revision9352c35d828c
ProjectionnoneETAnoneTarget Version3.0PR19Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041199: PaymentReportDao is not using bind-param

DescriptionSeveral 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
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00412583.0PR19Q3 closedTriage Omni OMS PaymentReportDao is not using bind-param 
depends on backport 00412593.0PR19Q2.1 closedcollazoandy4 PaymentReportDao is not using bind-param 
depends on backport 00412603.0PR19Q1.3 closedTriage Omni OMS PaymentReportDao is not using bind-param 
related to defect 0041302 closedcollazoandy4 Apply HQL style guide to PaymentReportDao 
related to defect 0041423 closedAtulOpenbravo The method getInvoicePaymentSchedule of PaymentReportDao.java is not used 
blocks design defect 0038136 acknowledgedTriage Platform Base Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 

-  Notes
(0113074)
shuehner (administrator)
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 (reporter)
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 (developer)
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 (developer)
2019-07-16 16:43

Code Review + Testing Ok
(0114151)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2019-06-27 18:09 shuehner New Issue
2019-06-27 18:09 shuehner Assigned To => Triage Finance
2019-06-27 18:09 shuehner Modules => Core
2019-06-27 18:09 shuehner Triggers an Emergency Pack => No
2019-06-27 18:10 shuehner Relationship added blocks 0032688
2019-06-27 18:12 shuehner Note Added: 0113074
2019-07-02 15:39 shuehner Relationship added blocks 0038136
2019-07-02 15:39 shuehner Relationship deleted blocks 0032688
2019-07-03 17:00 shuehner Status new => scheduled
2019-07-03 17:00 shuehner Target Version => 3.0PR19Q4
2019-07-04 17:48 Sandrahuguet Assigned To Triage Finance => collazoandy4
2019-07-09 17:14 Sandrahuguet Assigned To collazoandy4 => AtulOpenbravo
2019-07-09 17:47 Sandrahuguet Assigned To AtulOpenbravo => collazoandy4
2019-07-11 15:11 Sandrahuguet Relationship added related to 0041302
2019-07-12 06:34 collazoandy4 Note Added: 0113319
2019-07-16 16:39 hgbot Checkin
2019-07-16 16:39 hgbot Note Added: 0113430
2019-07-16 16:39 hgbot Status scheduled => resolved
2019-07-16 16:39 hgbot Resolution open => fixed
2019-07-16 16:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9352c35d828c9dcbc1e5e358b0e5cbd5c156e033 [^]
2019-07-16 16:43 dmiguelez Review Assigned To => dmiguelez
2019-07-16 16:43 dmiguelez Note Added: 0113439
2019-07-16 16:43 dmiguelez Status resolved => closed
2019-07-16 16:43 dmiguelez Fixed in Version => 3.0PR19Q4
2019-07-22 22:13 collazoandy4 Relationship added related to 0041423
2019-08-22 14:44 hudsonbot Checkin
2019-08-22 14:44 hudsonbot Note Added: 0114151


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker