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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030561
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminorhave not tried2015-08-12 14:552015-10-01 09:55
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q4
StatusclosedFix in branchFixed in SCM revision3e6a65bbb3ab
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030561: Use UPPER to achieve case insensitive filtering in CustomQuerySelectorDatasource

DescriptionMost of the times we use UPPER to achieve case insensitive filtering throughout the Openbravo codebase.

CustomQuerySelectorDatasource uses LOWER instead, and this can be a problem, because if someone has defined a function based index that uses UPPER, the query built in CustomQuerySelectorDatasource would not be able to take advantage of it.

This will be the first step towards consolidating the use of UPPER, see [1]

[1] https://issues.openbravo.com/view.php?id=30476 [^]
Steps To ReproduceCheck that CustomQuerySelectorDatasource uses lower [1], when in most places we use upper (see for instances [2] and [3], where the queries used when filtering the grid are built).

[1] https://code.openbravo.com/erp/devel/pi/file/3b3aefef0ce7/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java#l383 [^]
[2] https://code.openbravo.com/erp/devel/pi/file/3b3aefef0ce7/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java#l737 [^]
[3] https://code.openbravo.com/erp/devel/pi/file/3b3aefef0ce7/modules/org.openbravo.service.json/src/org/openbravo/service/json/QueryBuilder.java#l233 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0030476 newAugustoMauch Consolidate the user of UPPER/LOWER to achieve case insensitive filtering 
related to defect 0030488 closedplatform API Change: Replacement of LOWER with UPPER in queries 
related to defect 00251903.0PR14Q2 closedAugustoMauch Error when searching for characters like ß, in grid view 

-  Notes
(0079324)
hgbot (developer)
2015-08-12 15:07

Repository: erp/devel/pi
Changeset: 66d1115c23d490a416344bc158a4673887fb4361
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Aug 12 15:05:49 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/66d1115c23d490a416344bc158a4673887fb4361 [^]

Fixes issue 30561: UPPER is used inCustomQuerySelectorDatasource to build query

When the CustomQuerySelectorDatasource built the query to achieve case insensitive filtering, it used to use the LOWER function. We decided to change this, as UPPER is used much more often throughout the codebase. The fix has been checked with custom query selectors using both the iContains and the iStartsWith operators

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
---
(0079325)
AugustoMauch (developer)
2015-08-12 15:09

To test this, you can check that the Business Partner selector of the Sales Order header tab keeps working properly using both the iContains and the iStartsWith operator
(0079336)
alostale (developer)
2015-08-13 10:07

reopening after code review:

Unnecessary value.toLowerCase() which is later transformed to upper in SQL, in order not to have the same problem as reported in 0025190, the only string transformation should be done in SQL.
(0079542)
hudsonbot (developer)
2015-08-20 23:16

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/8c91718397a5 [^]
Maturity status: Test
(0080597)
hgbot (developer)
2015-09-24 09:25

Repository: erp/devel/pi
Changeset: 3e6a65bbb3ab4d0d2ef138aa62fc61c0d1722ac2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Sep 22 17:36:37 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3e6a65bbb3ab4d0d2ef138aa62fc61c0d1722ac2 [^]

Fixes issue 30561: Removes unneeded toLowerCase()

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
---
(0080626)
hudsonbot (developer)
2015-09-24 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/37e30a4ff711 [^]
Maturity status: Test
(0080772)
alostale (developer)
2015-10-01 09:55

code reviewed

tested for selectors with both Contains and Starts with matching styles

- Issue History
Date Modified Username Field Change
2015-08-12 14:55 AugustoMauch New Issue
2015-08-12 14:55 AugustoMauch Assigned To => platform
2015-08-12 14:55 AugustoMauch Modules => Core
2015-08-12 14:55 AugustoMauch Triggers an Emergency Pack => No
2015-08-12 14:56 AugustoMauch Relationship added related to 0030476
2015-08-12 14:57 AugustoMauch Relationship added related to 0030488
2015-08-12 14:57 AugustoMauch Status new => scheduled
2015-08-12 15:02 AugustoMauch Issue Monitored: alostale
2015-08-12 15:02 AugustoMauch Review Assigned To => alostale
2015-08-12 15:07 hgbot Checkin
2015-08-12 15:07 hgbot Note Added: 0079324
2015-08-12 15:07 hgbot Status scheduled => resolved
2015-08-12 15:07 hgbot Resolution open => fixed
2015-08-12 15:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/66d1115c23d490a416344bc158a4673887fb4361 [^]
2015-08-12 15:09 AugustoMauch Note Added: 0079325
2015-08-13 09:51 alostale Relationship added related to 0025190
2015-08-13 10:07 alostale Note Added: 0079336
2015-08-13 10:07 alostale Status resolved => new
2015-08-13 10:07 alostale Resolution fixed => open
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079542
2015-09-24 09:25 hgbot Checkin
2015-09-24 09:25 hgbot Note Added: 0080597
2015-09-24 09:25 hgbot Status new => resolved
2015-09-24 09:25 hgbot Resolution open => fixed
2015-09-24 09:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/66d1115c23d490a416344bc158a4673887fb4361 [^] => http://code.openbravo.com/erp/devel/pi/rev/3e6a65bbb3ab4d0d2ef138aa62fc61c0d1722ac2 [^]
2015-09-24 17:29 hudsonbot Checkin
2015-09-24 17:29 hudsonbot Note Added: 0080626
2015-10-01 09:39 alostale Assigned To platform => AugustoMauch
2015-10-01 09:55 alostale Note Added: 0080772
2015-10-01 09:55 alostale Status resolved => closed
2015-10-01 09:55 alostale Fixed in Version => 3.0PR15Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker