Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029732 | Openbravo ERP | A. Platform | public | 2015-04-29 13:22 | 2016-03-17 10:54 |
|
Reporter | Sandrahuguet | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | Community Appliance |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q4 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0029732: In a mandatory field, the query created when filtering shouldn't have the functions 'coalesce' and 'to_char' |
Description | In a mandatory field, the query created when filtering shouldn't have the functions 'coalesce' and 'to_char' |
Steps To Reproduce | -Go to Discounts and Promotions Window
-Navigate to Business partner tab
-Filter by 'A' and pres tab key
The following query is executed:
select pricingadj0_.M_Offer_Bpartner_ID as M1_503_, pricingadj0_.AD_Client_ID as AD2_503_, pricingadj0_.AD_Org_ID as AD3_503_, pricingadj0_.IsActive as IsActive503_, pricingadj0_.Created as Created503_, pricingadj0_.Createdby as Createdby503_, pricingadj0_.Updated as Updated503_, pricingadj0_.Updatedby as Updatedby503_, pricingadj0_.M_Offer_ID as M9_503_, pricingadj0_.C_BPartner_ID as C10_503_ from M_Offer_BPartner pricingadj0_ left outer join C_BPartner businesspa1_ on pricingadj0_.C_BPartner_ID=businesspa1_.C_BPartner_ID where (upper(coalesce(to_char(businesspa1_.Name), '')) like upper(?) escape '|') and pricingadj0_.M_Offer_ID=? and (pricingadj0_.AD_Org_ID in ('D270A5AC50874F8BA67A88EE977F8E3B' , '4399136852B145BD96CC2A6CE0800C68' , '14B1927026BE471E9B85FE699BCA61C2' , '0' , 'B5DE96143D6642228E3B9DEC69886A47' , '3B187EC130A549A7A9388F8060EF156D' , '67839EEFA49E44AC969BD60093FCC899' , '01AD882EFC8545ACA6455E2F6FD51EE9' , 'BF129721D9FB4EB0819509934153E972')) and (pricingadj0_.AD_Client_ID in ('39363B0921BB4293B48383844325E84C' , '0')) order by businesspa1_.Name, pricingadj0_.M_Offer_Bpartner_ID limit ?
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0029919 | | acknowledged | Triage Platform Base | The query done to populate table/tabledir dropdowns in forms when the user enters text can be improved | blocks | feature request | 0029612 | | closed | AugustoMauch | Extend the grid configuration to improve the performance of the population of foreign key dropdowns |
|
Attached Files | 29732.export (2,202) 2015-05-11 13:20 https://issues.openbravo.com/file_download.php?file_id=8071&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2015-04-29 13:22 | Sandrahuguet | New Issue | |
2015-04-29 13:22 | Sandrahuguet | Assigned To | => platform |
2015-04-29 13:22 | Sandrahuguet | Modules | => Core |
2015-04-29 13:22 | Sandrahuguet | Triggers an Emergency Pack | => No |
2015-04-29 13:23 | AugustoMauch | Assigned To | platform => AugustoMauch |
2015-04-29 13:23 | AugustoMauch | Status | new => acknowledged |
2015-05-11 13:11 | AugustoMauch | Relationship added | blocks 0029612 |
2015-05-11 13:20 | AugustoMauch | File Added: 29732.export | |
2015-05-18 18:36 | AugustoMauch | Relationship added | related to 0029919 |
2015-07-06 09:13 | AugustoMauch | Status | acknowledged => scheduled |
2015-07-06 09:23 | hgbot | Checkin | |
2015-07-06 09:23 | hgbot | Note Added: 0078649 | |
2015-07-06 09:23 | hgbot | Status | scheduled => resolved |
2015-07-06 09:23 | hgbot | Resolution | open => fixed |
2015-07-06 09:23 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e684c73bb502f85fb71b82f2e55ad35644dbe505 [^] |
2015-07-06 09:24 | AugustoMauch | Issue Monitored: alostale | |
2015-07-06 09:24 | AugustoMauch | Review Assigned To | => alostale |
2015-07-07 10:08 | alostale | Note Added: 0078698 | |
2015-07-07 10:08 | alostale | Status | resolved => closed |
2015-07-07 10:08 | alostale | Fixed in Version | => 3.0PR15Q4 |
2015-08-20 23:15 | hudsonbot | Checkin | |
2015-08-20 23:15 | hudsonbot | Note Added: 0079458 | |
2016-01-22 11:18 | hgbot | Checkin | |
2016-01-22 11:18 | hgbot | Note Added: 0083537 | |
2016-01-22 11:18 | hgbot | Status | closed => resolved |
2016-01-22 11:18 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/e684c73bb502f85fb71b82f2e55ad35644dbe505 [^] => http://code.openbravo.com/erp/devel/pi/rev/712d158da36ea648c5ebbb347c22a947387adadb [^] |
2016-01-29 08:32 | alostale | Note Added: 0083700 | |
2016-01-29 08:32 | alostale | Status | resolved => closed |
2016-03-17 10:54 | hudsonbot | Checkin | |
2016-03-17 10:54 | hudsonbot | Note Added: 0085065 | |
Notes |
|
(0078649)
|
hgbot
|
2015-07-06 09:23
|
|
Repository: erp/devel/pi
Changeset: e684c73bb502f85fb71b82f2e55ad35644dbe505
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 11 13:18:57 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e684c73bb502f85fb71b82f2e55ad35644dbe505 [^]
Fixes bug 29732: Get rid of coalesce(to_char()) when possible to improve query
We sometimes use the coalesce(to_char(value),'') functions to prevent passing null values in a where clause, replacing the null value with an empty string. The problem is that if those functions are used, then it will not be possible benefit from the indexes defined in the database.
In this issue we have made a distintion between mandatory and non-mandatory columns. Mandatory columns will no longer use the coalesce and to_char functions in the AdvancedQueryBuilder.createIdentifierLeftClause method. We can do that safely as it is not possible that those columns have null values.
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
|
|
|
|
|
|
|
|
|
(0083537)
|
hgbot
|
2016-01-22 11:18
|
|
Repository: erp/devel/pi
Changeset: 712d158da36ea648c5ebbb347c22a947387adadb
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 11 13:18:57 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/712d158da36ea648c5ebbb347c22a947387adadb [^]
Fixes bug 29732: Get rid of coalesce(to_char()) when possible to improve query
We sometimes use the coalesce(to_char(value),'') functions to prevent passing null values in a where clause, replacing the null value with an empty string. The problem is that if those functions are used, then it will not be possible benefit from the indexes defined in the database.
In this issue we have made a distintion between mandatory and non-mandatory columns. Mandatory columns will no longer use the coalesce and to_char functions in the AdvancedQueryBuilder.createIdentifierLeftClause method. We can do that safely as it is not possible that those columns have null values.
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
|
|
|
|
closed again: was set as resolved incorrectly |
|
|
|
|