Project

General

Profile

Actions

Defect #41096

open

"##" syntax auto complete does not work

Added by Katsuya HIDAKA 11 days ago. Updated 11 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

When triggered with a text starting with ##, like ##a, the search query becomes #a.

The controller receives #a but returns nothing because there are no issues that match the query.

Below is a part of Rails log when the input is ##a:

Started GET "/issues/auto_complete?project_id=ecookbook&q=%23ab" for 192.168.65.1 at 2024-08-06 01:26:32 +0000
Processing by AutoCompletesController#issues as */*
  Parameters: {"project_id"=>"ecookbook", "q"=>"#a"}
  (snip)
  Issue Load (0.4ms)  SELECT "issues".* FROM "issues" (snip) AND (issues.subject LIKE '%#a%' ESCAPE '\') ORDER BY "issues"."id" DESC LIMIT ?  [["project_id", 1], ["LIMIT", 10]]

I confirmed that this problem occurs in at least Redmine v5.1 and trunk.

Also, due to this problem, the system test 'test_inline_autocomplete_for_issues_with_double_hash_keep_syntax' is currently failing.

Capybara starting Puma...
* Version 6.4.2, codename: The Eagle of Durango
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:38479
...........[Screenshot Image]: /redmine/tmp/screenshots/failures_test_inline_autocomplete_for_issues_with_double_hash_keep_syntax.png
F

Failure:
InlineAutocompleteSystemTest#test_inline_autocomplete_for_issues_with_double_hash_keep_syntax [test/system/inline_autocomplete_test.rb:53]:
Expected false to be truthy.
...
This problem appears to be related to the following issues:

Files

Actions

Also available in: Atom PDF