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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041253
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 08. Project and service managementmajorhave not tried2019-07-03 16:522019-08-22 14:44
ReportershuehnerView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q4
StatusclosedFix in branchFixed in SCM revision5179ba16ea15
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

0041253: ReportProjectProfitabilityJR.noConversionToHours is not using bind-params

DescriptionThis code is not using bind-params:

    if (StringUtils.isNotEmpty(strOrg)) {
      hsqlScript.append(" and p." + Project.PROPERTY_ORGANIZATION + ".id in (" + strOrg + ")");
    }

When fixing please apply new HQL-style to every HQL in this file.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00412543.0PR19Q3 closedTriage Omni OMS ReportProjectProfitabilityJR.noConversionToHours is not using bind-params 
depends on backport 00412553.0PR19Q2.1 closedAtulOpenbravo ReportProjectProfitabilityJR.noConversionToHours is not using bind-params 
depends on backport 00412563.0PR19Q1.3 closedTriage Omni OMS ReportProjectProfitabilityJR.noConversionToHours is not using bind-params 
related to defect 0041342 closedTriage Omni OMS Apply new HQL Style to HQL in ReportProjectProfitabilityJR 
related to defect 0041343 newTriage Omni OMS Remove selectOrg & treeOrg methods used in ReportProjectProfitabilityJR 
blocks design defect 0038136 acknowledgedTriage Platform Base Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 

-  Notes
(0113375)
AtulOpenbravo (developer)
2019-07-15 14:41

Verified the bind-params values for organization by configuring the log4j2-web.xml as

<Loggers>
 <Root level="info">
 <AppenderRef ref="Console"/>
 </Root>
 <Logger name="reloadXml" level="error"/>
 <Logger name="org.hibernate.SQL" level="debug"/>
 <Logger name="org.hibernate.type.descriptor.sql" level="trace"/>
</Loggers>


Log:

[http-bio-8180-exec-3] DEBUG org.hibernate.SQL - select uom0_.C_UOM_ID as C_UOM_ID1_294_, uom0_.AD_Client_ID as AD_Clien2_294_, uom0_.AD_Org_ID as AD_Org_I3_294_, uom0_.IsActive as IsActive4_294_, uom0_.Created as Created5_294_, uom0_.Updated as Updated6_294_, uom0_.CreatedBy as CreatedB7_294_, uom0_.UpdatedBy as UpdatedB8_294_, uom0_.X12DE355 as X9_294_, uom0_.UOMSymbol as UOMSymb10_294_, uom0_.Name as Name11_294_, uom0_.Description as Descrip12_294_, uom0_.StdPrecision as StdPrec13_294_, uom0_.CostingPrecision as Costing14_294_, uom0_.IsDefault as IsDefau15_294_, uom0_.Breakdown as Breakdo16_294_, uom0_.UOM_Type as UOM_Typ17_294_, uom0_.Useinproduction as Useinpr18_294_ from C_UOM uom0_ where (exists (select 1 from S_TimeExpenseLine timeandexp1_ inner join S_TimeExpense timeandexp2_ on timeandexp1_.S_TimeExpense_ID=timeandexp2_.S_TimeExpense_ID left outer join C_Project project3_ on timeandexp1_.C_Project_ID=project3_.C_Project_ID where timeandexp1_.IsTimeReport='Y' and timeandexp1_.C_UOM_ID=uom0_.C_UOM_ID and timeandexp1_.C_UOM_ID<>'101' and timeandexp2_.Processed='Y' and (project3_.AD_Org_ID in (? , ? , ?)))) and not (exists (select 1 from C_UOM_Conversion uomconvers4_ where uomconvers4_.C_UOM_ID=uom0_.C_UOM_ID and uomconvers4_.C_UOM_To_ID='101')) and (uom0_.AD_Org_ID in (? , ? , ? , ? , ? , ? , ? , ?)) and (uom0_.AD_Client_ID in (? , ?)) and uom0_.IsActive='Y'

[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [1] as [VARCHAR] - [E443A31992CB4635AFCAEABE7183CE85]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [2] as [VARCHAR] - [B843C30461EA4501935CB1D125C9C25A]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [3] as [VARCHAR] - [DC206C91AA6A4897B44DA897936E0EC3]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [4] as [VARCHAR] - [0]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [5] as [VARCHAR] - [E443A31992CB4635AFCAEABE7183CE85]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [6] as [VARCHAR] - [B843C30461EA4501935CB1D125C9C25A]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [7] as [VARCHAR] - [BAE22373FEBE4CCCA24517E23F0C8A48]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [8] as [VARCHAR] - [DC206C91AA6A4897B44DA897936E0EC3]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [9] as [VARCHAR] - [2E60544D37534C0B89E765FE29BC0B43]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [10] as [VARCHAR] - [19404EAD144C49A0AF37D54377CF452D]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [11] as [VARCHAR] - [7BABA5FF80494CAFA54DEBD22EC46F01]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [12] as [VARCHAR] - [23C59575B9CF467C9620760EB255B389]
[http-bio-8180-exec-3] TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [13] as [VARCHAR] - [0]
(0113376)
AtulOpenbravo (developer)
2019-07-15 14:43

Verifed using postgresql logs by configuring postgresql.conf with below parameters as:

log_statement = 'all'
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
logging_collector = on
log_min_error_statement = error


logs:

execute <unnamed>/C_10:

select uom0_.C_UOM_ID as C_UOM_ID1_294_, uom0_.AD_Client_ID as AD_Clien2_294_, uom0_.AD_Org_ID as AD_Org_I3_294_, uom0_.IsActive as IsActive4_294_, uom0_.Created as Created5_294_, uom0_.Updated as Updated6_294_, uom0_.CreatedBy as CreatedB7_294_, uom0_.UpdatedBy as UpdatedB8_294_, uom0_.X12DE355 as X9_294_, uom0_.UOMSymbol as UOMSymb10_294_, uom0_.Name as Name11_294_, uom0_.Description as Descrip12_294_, uom0_.StdPrecision as StdPrec13_294_, uom0_.CostingPrecision as Costing14_294_, uom0_.IsDefault as IsDefau15_294_, uom0_.Breakdown as Breakdo16_294_, uom0_.UOM_Type as UOM_Typ17_294_, uom0_.Useinproduction as Useinpr18_294_ from C_UOM uom0_ where (exists (select 1 from S_TimeExpenseLine timeandexp1_ inner join S_TimeExpense timeandexp2_ on timeandexp1_.S_TimeExpense_ID=timeandexp2_.S_TimeExpense_ID left outer join C_Project project3_ on timeandexp1_.C_Project_ID=project3_.C_Project_ID where timeandexp1_.IsTimeReport='Y' and timeandexp1_.C_UOM_ID=uom0_.C_UOM_ID and timeandexp1_.C_UOM_ID<>'101' and timeandexp2_.Processed='Y' and (project3_.AD_Org_ID in ($1 , $2 , $3)))) and not (exists (select 1 from C_UOM_Conversion uomconvers4_ where uomconvers4_.C_UOM_ID=uom0_.C_UOM_ID and uomconvers4_.C_UOM_To_ID='101')) and (uom0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11)) and (uom0_.AD_Client_ID in ($12 , $13)) and uom0_.IsActive='Y'

DETAIL:
parameters:
$1 = 'E443A31992CB4635AFCAEABE7183CE85',
$2 = 'B843C30461EA4501935CB1D125C9C25A',
$3 = 'DC206C91AA6A4897B44DA897936E0EC3',
$4 = '0',
$5 = 'E443A31992CB4635AFCAEABE7183CE85',
$6 = 'B843C30461EA4501935CB1D125C9C25A',
$7 = 'BAE22373FEBE4CCCA24517E23F0C8A48',
$8 = 'DC206C91AA6A4897B44DA897936E0EC3',
$9 = '2E60544D37534C0B89E765FE29BC0B43',
$10 = '19404EAD144C49A0AF37D54377CF452D',
$11 = '7BABA5FF80494CAFA54DEBD22EC46F01',
$12 = '23C59575B9CF467C9620760EB255B389',
$13 = '0'
(0113468)
hgbot (developer)
2019-07-17 11:26

Repository: erp/devel/pi
Changeset: 5179ba16ea150015f93c7e02572937d44e197725
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Sun Jul 14 23:33:32 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5179ba16ea150015f93c7e02572937d44e197725 [^]

Fixes Issue 41253: ReportProjectProfitabilityJR.noConversionToHours
is not using bind-params

Applied bind-params to organization ids in noConversionToHours
method. Organization ids are obtained from OrganizationStructureProvider

---
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java
---
(0113477)
dmiguelez (developer)
2019-07-17 11:28

Code Review + Testing Ok
(0114154)
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-07-03 16:52 shuehner New Issue
2019-07-03 16:52 shuehner Assigned To => Triage Finance
2019-07-03 16:52 shuehner Modules => Core
2019-07-03 16:52 shuehner Triggers an Emergency Pack => No
2019-07-03 16:52 shuehner Relationship added blocks 0038136
2019-07-03 16:53 shuehner Status new => scheduled
2019-07-04 12:02 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 08:28 Sandrahuguet Assigned To collazoandy4 => AtulOpenbravo
2019-07-12 11:18 AtulOpenbravo Relationship added related to 0041342
2019-07-12 11:19 AtulOpenbravo Relationship added related to 0041343
2019-07-15 14:41 AtulOpenbravo Note Added: 0113375
2019-07-15 14:43 AtulOpenbravo Note Added: 0113376
2019-07-17 11:26 hgbot Checkin
2019-07-17 11:26 hgbot Note Added: 0113468
2019-07-17 11:26 hgbot Status scheduled => resolved
2019-07-17 11:26 hgbot Resolution open => fixed
2019-07-17 11:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5179ba16ea150015f93c7e02572937d44e197725 [^]
2019-07-17 11:28 dmiguelez Review Assigned To => dmiguelez
2019-07-17 11:28 dmiguelez Note Added: 0113477
2019-07-17 11:28 dmiguelez Status resolved => closed
2019-07-17 11:28 dmiguelez Fixed in Version => 3.0PR19Q4
2019-08-22 14:44 hudsonbot Checkin
2019-08-22 14:44 hudsonbot Note Added: 0114154


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker