Patch #27122

Case insensitive filter for version name

Added by Nastya Fedorova 7 months ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:4.1.0


Search for version name does not work for case sensitive names

Case_sensitive_filter_for_version_name_.patch Magnifier (622 Bytes) Nastya Fedorova, 2017-10-04 15:17

case_sensitive_filter_for_version_name_2.patch Magnifier (1.29 KB) Mizuki ISHIKAWA, 2018-03-22 01:31


#1 Updated by Anonymous 6 months ago

  • File photo_2017-09-01_22-08-39.jpg added

#2 Updated by Holger Just 6 months ago

There is a database-agnostic helper method for a case-insensititive LIKE. You should be able to just use this:

where(["Version.table_name}.name", '?'), pattern])

MySQL is case-insensitive by default. Searching on Postgres should work with this method. As for the other supported databases: I'm not fully sure whether they do the right thing there. If they don't show the correct behavior then the method should be fixed.

#3 Updated by Mischa The Evil 6 months ago

  • File deleted (photo_2017-09-01_22-08-39.jpg)

#4 Updated by Toshi MARUYAMA 6 months ago

  • Category changed from Search engine to Roadmap
  • Target version set to 4.1.0

#5 Updated by Mizuki ISHIKAWA about 1 month ago

Attach the patch that added the test to the code written by Holger Just ( #27122#note-2 ).

Also available in: Atom PDF