Opened 16 years ago
Last modified 3 years ago
#5720 new defect
Trac ticket query should be case insensitive.
|Reported by:||Lachezar Dobrev||Owned by:|
|Severity:||major||Keywords:||query case sensitive|
Description (last modified by )
The current implementation of the Trac ticket query system is case sensitive, which is very frustrating.
Searching for Owner=Jonas does not yield the same results as searching for Owner=jonas (whereas Owner=~Jonas and Owner=~jonas do).
This makes it very hard to find your own tickets if your user name is not lowercase, and puts up a lot of problems finding whether there is already an entered ticket on a specific subject.
Change History (13)
comment:1 by , 16 years ago
comment:2 by , 15 years ago
|Status:||new → closed|
comment:3 by , 15 years ago
I also have case sensitive searches. I use a mySQL database and have found that this behaviour is caused by the 'COLLATE' method specified when creating the Trac database.
When I created the Trac database I executed the following command:
CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
The "COLLATE utf8_bin" part at the end tells mySQL to compare strings using a binary comparison, which as you would expect compares the actual ASCII character codes - so 'a' is different to 'A'. To make searches case insensitive I should have used:
which makes mySQL compare strings in a non-binary way.
To fix this I manually modified all the text fields in the database to use the utf8_general_ci method (it's in the column details tab when viewing table properties).
comment:4 by , 12 years ago
|Status:||closed → reopened|
I also came across the issue of TicketQuery being case-sensitive (I'm running 0.12.1), and found this ticket stating that it is not the case (at least back then).
It seems that even on current t.e.o the TicketQuery is case-sensitive. Following are two query examples, the first one returning 3 results, the second one returning zero results.
comment:5 by , 12 years ago
Seems the difference comes from "contains" vs. "equals". The former is case insensitive ,the latter not.
I've fixed the ticket description accordingly.
comment:6 by , 12 years ago
Sorry, take two ;-)
comment:7 by , 12 years ago
comment:8 by , 10 years ago
comment:9 by , 10 years ago
see also #11372
the web interface only does case-sensitive sorts when e.g. the word "Owner" is clicked thus spreading identical mail targets (e-mail is case in-sensitive) to at least two different locations.
this report is still valid for Trac 1.0.1
comment:10 by , 8 years ago
|Milestone:||next-minor-0.12.x → next-stable-1.0.x|
comment:11 by , 8 years ago
|Status:||reopened → new|
comment:12 by , 7 years ago
|Milestone:||next-stable-1.0.x → next-stable-1.2.x|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:13 by , 3 years ago
|Milestone:||next-stable-1.2.x → next-stable-1.4.x|
Worksforme here on t.e.o, and in my local test environments (SQLite, MySQL and PostgreSQL), with 0.11-stable.
If someone can reproduce the issue, please reopen with detailed information about the setup.