Vote #80833
完了Time entry user is shown twice in the User drop-down when editing spent time
0%
説明
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
journals
!{width: 407px; border: 1px solid #ccc;}.33341-screenshot.png!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------
related_issues
relates,Closed,32973,Editing a time entry for a locked user changes the user to the current user