プロジェクト

全般

プロフィール

Vote #80833

完了

Time entry user is shown twice in the User drop-down when editing spent time

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

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

0%

予定工数:
category_id:
13
version_id:
162
issue_org_id:
33341
author_id:
291
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
160
ステータス-->[Closed]

説明

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

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

  • カテゴリTime tracking_13 にセット
  • 対象バージョン4.1.2_162 にセット

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

いいね!0
いいね!0