Project

General

Profile

Actions

Patch #30971

open

principals_options_for_select does not select user when user id is numeric

Added by Jérôme BATAILLE almost 6 years ago. Updated almost 6 years ago.

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

0%

Estimated time:

Description

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
Actions #1

Updated by Go MAEDA almost 6 years ago

Could you show the steps to reproduce the problem with the Web UI?

Actions #2

Updated by Jérôme BATAILLE almost 6 years ago

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
Actions

Also available in: Atom PDF