Defect #32973

Editing a time entry for a locked user changes the user to the current user

Added by Marius BALTEANU 8 months ago. Updated 6 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Time tracking
Target version:4.1.1
Resolution:Fixed Affected version:4.1.0

Description

Steps to reproduce:

1. Add a time entry for another user (B)
2. Lock that user (B)
3. Edit the time entry
4. Observe that field User is selected with "me".

Saving the time entry, it will lose the user.

me.png (50.4 KB) Marius BALTEANU, 2020-02-08 21:48

0002-Reorder-and-rename-test-added-in-32959.patch Magnifier (1.69 KB) Marius BALTEANU, 2020-02-09 15:21

0001-Allow-editing-a-time-entry-logged-on-a-locked-user.patch Magnifier (3.75 KB) Marius BALTEANU, 2020-02-09 15:21


Related issues

Related to Redmine - Feature #3848: Permission to log time for another user Closed 2009-09-11
Related to Redmine - Defect #33341: Time entry user is shown twice in the User drop-down when... Closed

Associated revisions

Revision 19651
Added by Jean-Philippe Lang 6 months ago

Editing a time entry for a locked user changes the user to the current user (#32973).

Patch by Marius BALTEANU.

Revision 19652
Added by Jean-Philippe Lang 6 months ago

Reorder and rename test added in r19651 (#32973).

Patch by Marius BALTEANU.

Revision 19657
Added by Jean-Philippe Lang 6 months ago

Merged r19651 and r19652 to 4.1-stable (#32973).

History

#1 Updated by Marius BALTEANU 8 months ago

  • Related to Feature #3848: Permission to log time for another user added

#2 Updated by Marius BALTEANU 8 months ago

I see two options to fix this:

1. We don't allow changing the user when the time entry is logged on a locked user.
2. We add the locked user to the list of users.

#3 Updated by Go MAEDA 8 months ago

Marius BALTEANU wrote:

I see two options to fix this:

1. We don't allow changing the user when the time entry is logged on a locked user.
2. We add the locked user to the list of users.

I think the second option is better because the limitation suggested in option 1 may confuse users. In my opinion, there is no reason to disallow changing the user when the user of the time entry is locked.

#4 Updated by Marius BALTEANU 8 months ago

Here is the fix for the second option, but I would like a double check on the solution. The second patch renames and reorders the test added in #32959.

All tests pass: https://gitlab.com/redmine-org/redmine/pipelines/116292306

#5 Updated by Jean-Philippe Lang 6 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed and merged, thanks!

#6 Updated by Go MAEDA 5 months ago

  • Related to Defect #33341: Time entry user is shown twice in the User drop-down when editing spent time added

Also available in: Atom PDF