Defect #27122

Filter for version name should be case-insensitive

Added by Nastya Fedorova 11 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Project settings
Target version:3.4.6
Resolution:Fixed Affected version:

Description

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

case_sensitive_filter_for_version_name_3.patch Magnifier (1.13 KB) Mizuki ISHIKAWA, 2018-04-24 10:20

case_sensitive_filter_for_version_name_4.patch Magnifier (1.17 KB) Mizuki ISHIKAWA, 2018-04-24 10:29

Associated revisions

Revision 17316
Added by Go MAEDA 4 months ago

Filter for version name should be case-insensitive (#27122).

Patch by Holger Just and Mizuki ISHIKAWA.

Revision 17317
Added by Go MAEDA 4 months ago

Merged r17316 from trunk to 3.4-stable (#27122).

History

#1 Updated by Anonymous 10 months ago

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

#2 Updated by Holger Just 10 months ago

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

where([Redmine::Database.like("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 Redmine::Database.like method should be fixed.

#3 Updated by Mischa The Evil 10 months ago

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

#4 Updated by Toshi MARUYAMA 10 months ago

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

#5 Updated by Mizuki ISHIKAWA 5 months ago

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

#6 Updated by Mizuki ISHIKAWA 4 months ago

I fixed the test code.

#7 Updated by Mizuki ISHIKAWA 4 months ago

There was also a problem with the test of case_sensitive_filter_for_version_name_3.patch, so I fixed it.

#8 Updated by Go MAEDA 4 months ago

  • Tracker changed from Patch to Defect
  • Subject changed from Case insensitive filter for version name to Filter for version name should be case-insensitive
  • Category changed from Roadmap to Project settings
  • Target version changed from 4.1.0 to 3.4.6

This is a defect rather than a feature. I am setting target version to 3.4.6.

#9 Updated by Go MAEDA 4 months ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA

#10 Updated by Go MAEDA 4 months ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Committed. Thank you all for detecting and fixing this issue.

Also available in: Atom PDF