Defect #43869
closedDefault assignee selected by category is not shown in UI
Description
When selecting a category, the default assignee of that category should be shown automatically.
This feature works correctly in Redmine 5.1.2.
However, after upgrading to Redmine 6.1.1, it no longer works.
The assignee is actually selected, but it is not shown correctly in the UI.
We found the difference in the HTML of the assignee field.
In Redmine 5.1.2, the HTML is:
<select name="issue[assigned_to_id]" id="issue_assigned_to_id">
<option value="">user2 test</option>
<option value="1"><< me >></option>
<option value="1">Redmine Admin</option>
<option value="5">user1 test</option>
<option value="6">user2 test</option>
</select>
In Redmine 6.1.1, the HTML becomes:
<select name="issue[assigned_to_id]" id="issue_assigned_to_id">
<option value="" label=" ">user2 test</option>
<option value="1"><< me >></option>
<option value="1">Redmine Admin</option>
<option value="5">user1 test</option>
<option value="6">user2 test</option>
</select>
There is a new attribute
label in the first <option>:<option value="" label=" "></option>
According to the HTML specification, if an
<option> has a label attribute, the browser will display the label value instead of the inner text.Because the label is
" " (empty space), the selected assignee appears blank in the UI, even though the value is set.
We suspect this change may be related to the new UI/theme in Redmine 6.x, but we are not sure where it should be fixed.
Could someone help check and fix this issue?
Files
Related issues
Updated by Go MAEDA 14 days ago
- Related to Feature #15919: Set default category assignee immediately upon category selection added
Updated by Go MAEDA 14 days ago
- File 43869.patch 43869.patch added
- Target version set to Candidate for next minor release
Thank you for reporting the issue.
The attached patch should fix the reported issue.
Updated by Marius BĂLTEANU 11 days ago
- Assignee set to Marius BĂLTEANU
- Target version changed from Candidate for next minor release to 6.0.9
The issue reproduces on all 6.* versions.
Updated by Mizuki ISHIKAWA 11 days ago
https://github.com/redmine/redmine/actions/runs/23107324918/job/67118743164
It looks like there are unnecessary blank lines on lines 9058 and 9059 in the https://www.redmine.org/projects/redmine/repository/svn/revisions/24491/diff, and the lint check is also failing because of them.
Updated by Marius BĂLTEANU 10 days ago
Go MAEDA wrote in #note-6:
The test in
test/functional/issues_controller_test.rb:4245fails after commit r24491 because the changes toapp/views/issues/new.js.erbincluded in the original patch 43869.patch were omitted.
I wanted to validate first on which branch the issue reproduces. I've committed now also the fix.
Updated by Marius BĂLTEANU 10 days ago
- Status changed from Confirmed to Resolved
- Resolution set to Fixed
Updated by Marius BĂLTEANU 10 days ago
- Affected version changed from 6.1.1 to 6.0.8
