プロジェクト

全般

プロフィール

Vote #79886

未完了

principals_options_for_select does not select user when user id is numeric

Admin Redmine さんが約4年前に追加. 約4年前に更新.

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

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
30971
author_id:
36999
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

+To fix it+ : In application Helper L487
convert selected to string if it is an integer


if selected.is_a?(Integer)
  selected_s = selected.to_s
else
  selected_s = selected
end
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) || element.id.to_s == selected_s

journals

Could you show the steps to reproduce the problem with the Web UI?
--------------------------------------------------------------------------------
The only places where selected is an integer are :
* in bulk edit :
->/lxc/redmine4/home/smile/redmine-4.0.0/app/views/issues/bulk_edit.html.erb
74: principals_options_for_select(@assignables, @issue_params[:assigned_to_id])) %>
NOT sure if @issue_params[:assigned_to_id]) is passed as a string or an integer

* and in Redmine V4.1 :
in timelog_helper : user_collection_for_select_options
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット

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

いいね!0
いいね!0