Actions
Defect #33341
closedTime entry user is shown twice in the User drop-down when editing spent time
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Hi,
When editing Spent Time the current time entry user is shown twice in the User drop-down.
This is because the condition to add the current time entry user to the collection is wrong in TimelogHelper#user_collection_for_select_options
.
It is:
collection << time_entry.user unless time_entry.user.nil? && !collection.include?(time_entry.user)
But it should be:
collection << time_entry.user if time_entry.user && !collection.include?(time_entry.user)
Best regards,
Thomas
Files
Related issues
Updated by Go MAEDA over 4 years ago
- File 33341-screenshot.png 33341-screenshot.png added
- Status changed from New to Confirmed
- Affected version set to 4.1.0
Updated by Go MAEDA over 4 years ago
- Affected version changed from 4.1.0 to 4.1.1
Updated by Go MAEDA over 4 years ago
- Related to Defect #32973: Editing a time entry for a locked user changes the user to the current user added
Updated by Marius BĂLTEANU over 4 years ago
- File 0001-Fix-time-entry-user-is-shown-twice-in-the-User-drop-.patch 0001-Fix-time-entry-user-is-shown-twice-in-the-User-drop-.patch added
The fix looks good to me. The attached patch contains the fix and an assertion.
Tests pass: https://gitlab.com/redmine-org/redmine/pipelines/139995890
Updated by Go MAEDA over 4 years ago
- Subject changed from When editing Spent Time the current time entry user is shown twice in the User drop-down to Time entry user is shown twice in the User drop-down when editing spent time
- Status changed from Confirmed to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the fix. Thank you.
Actions