Edgewall Software
Modify

Opened 17 years ago

Last modified 7 months ago

#5720 new defect

Trac ticket query should be case insensitive.

Reported by: Lachezar Dobrev Owned by:
Priority: normal Milestone: next-stable-1.6.x
Component: report system Version:
Severity: major Keywords: query case sensitive
Cc: itamarost@…, alexander.stohr@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

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.

The fixes in [4435] and #4363 do not fix this issue.

Attachments (0)

Change History (14)

comment:1 by Christian Boos, 17 years ago

Milestone: 0.11.1

comment:2 by Christian Boos, 16 years ago

Milestone: 0.11.2
Resolution: worksforme
Status: newclosed

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.

comment:3 by anonymous, 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:

COLLATE utf8_general_ci

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 anonymous, 13 years ago

Resolution: worksforme
Status: closedreopened

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.

[[TicketQuery(max=3,owner=cboos)]]:

#40
InterWiki links support
#48
Improve the display of multi line commit messages in the Timeline
#124
Better handling of ChangeLog style commit messages

[[TicketQuery(max=3,owner=CBoos)]]: No results

comment:5 by Christian Boos, 13 years ago

Description: modified (diff)
Milestone: next-minor-0.12.x

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 Christian Boos, 13 years ago

Description: modified (diff)

Sorry, take two ;-)

comment:7 by Itamar Ostricher, 13 years ago

Cc: itamarost@… added

comment:8 by alexander.stohr@…, 10 years ago

Cc: alexander.stohr@… added

comment:9 by alexander.stohr@…, 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 Ryan J Ollos, 9 years ago

Milestone: next-minor-0.12.xnext-stable-1.0.x

comment:11 by Ryan J Ollos, 9 years ago

Owner: Matthew Good removed
Status: reopenednew

comment:12 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.xnext-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 Ryan J Ollos, 4 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:14 by Ryan J Ollos, 7 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.