Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038141Openbravo ERP07. Sales managementpublic2018-03-14 15:092018-03-19 16:19
shuehner 
Sandrahuguet 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q2 
aferraz
Core
No
0038141: FIN_Utility.getDocumentType is not using bind-variables
The following code is not using bind-variables:
see tracking issue for list of reasons why that is bad.

      whereOrderByClause.append(" as dt where dt.organization.id in (");
      whereOrderByClause.append(Utility.getInStrSet(new OrganizationStructureProvider()
          .getParentTree(org.getId(), true)));
      whereOrderByClause.append(") and dt.client.id = '" + client.getId()
          + "' and dt.documentCategory = '" + docCategory + "' order by ad_isorgincluded('"
          + org.getId() + "', dt.organization.id, '" + client.getId()
          + "') , dt.default desc, dt.id desc");
      OBQuery<DocumentType> dt = OBDal.getInstance().createQuery(DocumentType.class,
          whereOrderByClause.toString());
-
No tags attached.
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
2018-03-14 15:09shuehnerNew Issue
2018-03-14 15:09shuehnerAssigned To => Triage Finance
2018-03-14 15:09shuehnerModules => Core
2018-03-14 15:09shuehnerTriggers an Emergency Pack => No
2018-03-14 15:09shuehnerRelationship addedblocks 0038136
2018-03-14 16:34shuehnerAssigned ToTriage Finance => Sandrahuguet
2018-03-15 11:29SandrahuguetStatusnew => scheduled
2018-03-16 08:21hgbotCheckin
2018-03-16 08:21hgbotNote Added: 0103300
2018-03-16 08:22hgbotStatusscheduled => resolved
2018-03-16 08:22hgbotResolutionopen => fixed
2018-03-16 08:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6033a86144f7ea740edff36bd207aeb060be1426 [^]
2018-03-16 08:32SandrahuguetReview Assigned To => aferraz
2018-03-16 12:00hgbotCheckin
2018-03-16 12:00hgbotNote Added: 0103312
2018-03-16 12:06aferrazNote Added: 0103313
2018-03-16 12:06aferrazStatusresolved => closed
2018-03-16 12:06aferrazFixed in Version => 3.0PR18Q2
2018-03-16 17:29hudsonbotCheckin
2018-03-16 17:29hudsonbotNote Added: 0103328
2018-03-19 16:19hudsonbotCheckin
2018-03-19 16:19hudsonbotNote Added: 0103350

Notes
(0103300)
hgbot   
2018-03-16 08:21   
Repository: erp/devel/pi
Changeset: 6033a86144f7ea740edff36bd207aeb060be1426
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Mar 15 16:21:15 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6033a86144f7ea740edff36bd207aeb060be1426 [^]

Fixed issue 38141 use bind-variables in FIN_Utility.getDocumentType

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
(0103312)
hgbot   
2018-03-16 12:00   
Repository: erp/devel/pi
Changeset: 57d94fae1907b4c2371488fbafd6f0f45bd3dc60
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 16 11:59:46 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/57d94fae1907b4c2371488fbafd6f0f45bd3dc60 [^]

Related to issue 38141: Code review improvements

Make query more readable.
Update license year.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
(0103313)
aferraz   
2018-03-16 12:06   
Code review + Testing OK
(0103328)
hudsonbot   
2018-03-16 17:29   
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/5323533018b6 [^]
Maturity status: Test
(0103350)
hudsonbot   
2018-03-19 16:19   
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/07f42b4b2051 [^]
Maturity status: Test