プロジェクト

全般

プロフィール

Vote #72538

完了

Autocomplete results not reset after clearing search field

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
57
issue_org_id:
11909
author_id:
61747
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
47
ステータス-->[Closed]

説明

h2. Explain for the defect

There are several autocomplete UI's for searching a specific field in redmine;
for example, searching for user (in a modal dialog when adding issue watchers) and for user or group (in the member tab of project settings).

!searchfield-empty.png!

The search result at first show the list of all possible values (to be added),
and when user types a query to search for user (or group), with a delay of 300ms, the search result list shows up with checkboxes.

However, if the search query becomes an empty string,
no ajax request is fired and therefore the list remains to show values the search result for the preivous query, which seems to be quite unnatural.

Is this behavior intended, or is a bug ? For older versions of redmine (e.g. 1.1.x), the search works as I expected.

I think, when query becomes empty, showing up the list identical to the initial list (when query was empty) would be more natural behavior.
That is, the ajax request should be fired even if the query is empty.

h2. About the implementation

Since 2.1, redmine has adopted jQuery, and the cause lies on the function 'observeSearchfield' in /public/javascripts/application.js.

There is an if clause that checks whether query is empty (see source:/trunk/public/javascripts/application.js#L481).
What if it is removed?

Moreover, as far as I know, recent versions (such as 1.4.x and 2.0.x) are affected as well.
Shortly, I will find out patches for the older versions that has another implementation of field observation.

Thank you very much!


journals

--------------------------------------------------------------------------------
After an inspection, it turns out there is *NO* problem with redmine 1.4.x and 2.0.x. Affected by turning into jQuery only.
Thanks!
--------------------------------------------------------------------------------
Patch committed in r10527 and merged into 2.1-stable, thanks.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン2.1.1_57 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0