Feature #3848
Allow the current user to record the time spent by another one.
| Status: | New | Start date: | 2009-09-11 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | Time tracking | |||
| Target version: | - | |||
| Resolution: |
Description
This patch allows the current user to record the time spent by another one, as you can see in timelog1.png and timelog2.png I wrote this patch because my co-workers are too lazy busy to update their issues ;)
I never programmed in Ruby before this patch, so feel free to rewrite it at your convenience. Maybe an exception should be thrown in the controllers if the current user tries to edit a time entry he is not allowed to, even if it is already checked in the views.
Related issues
History
#1 Updated by Cedric VINCENT almost 4 years ago
Patch to apply against redmine-0.8.4
#2 Updated by Eric Davis almost 4 years ago
- Category set to Time tracking
Thank you, that's a good feature. We'll need to update the patch to apply to trunk. I'm not sure if the edit time entries permission should be used or if a new one should be created.
#3 Updated by Jean-Philippe Lang almost 4 years ago
I think a new permission would be required if we add this feature.
#4 Updated by Cedric VINCENT over 3 years ago
- File 0002-Access-params-time_entry-only-if-editing-a-time-entr.patch
added - File 0003-Allow-to-change-the-owner-a-protected-attribute-of-a.patch
added
Oops! There are two bugs in the previous patch, here come the corresponding fixes:
- Access params[:time_entry] only if editing a time entry. It fixes the error "ActiveRecord::RecordNotFound".
- Allow to change the "owner" of a time entry. Previously, the "owner" was not changed because it is a protected attribute.
Cheers,
Cedric.
#5 Updated by Oleg Volkov over 3 years ago
You can update the patch to version 0.9.3?
#6 Updated by Oleg Volkov over 3 years ago
This patch is not entirely correct, since there is no information who (instead of the user) has made him the information. In addition, there is a need to create new questions and make comments from another user. Both questions are needed when the user is not possible to do it yourself, and he asked the operator to do so by phone.
#7 Updated by Oleg Volkov over 3 years ago
#8 Updated by Oleg Volkov over 3 years ago
- File time-spent-by-another-user-v.0.1.path added
This path is changed:
1. Allow change user only entry/edit "Spent time" (http://www.redmine.org/attachments/2520/timelog1.png) and disabled from Issue Update (http://www.redmine.org/attachments/2521/timelog2.png).
2. Select only users with permission to add record time. (Excluded admin!)
TODO: Logged real user name.
#9 Updated by Oleg Volkov over 3 years ago
- File time-spent-by-another-user-v.0.2.patch
added
I created a new version of the patch.
The patch is shorter.
#10 Updated by Arnaud Lesauvage over 2 years ago
I'm very interested in this patch. Is the patch submitted by Oleg still working ?
We are running redmine against trunk r4359.
I still think this is a very useful feature. In our company, we have projects where the workers do not encode their spent times themselves.
Eric and Jean-Philippe both have shown interest in this so I am hopeful in seeing this integrated in trunk ?
#11 Updated by Jack T about 2 years ago
- File log-time-for-another-user.diff
added
Updated Oleg's patch to work on Redmine 1.1.0.
I'm new to Redmine, and one of the updates I made to Oleg's patch was in app/controllers/timelog_controller.rb, I made changes to both def new and def create sections instead of @def edit.
#12 Updated by Lars Dornheim almost 2 years ago
- File patch-3848_log-time-for-others-users-ld.diff
added
The last patch did not work for my Redmine 1.1.0.stable.4761, so I adapted it a little bit to work with my Redmine. Furthermore editing of the user field of existing time logs now works for me, too.
#13 Updated by Pavel Potcheptsov 7 months ago
Is there any plan to include this in current?
#14 Updated by Pavel Potcheptsov 5 months ago
this worked for 1.3.3
but unfortunately last patch doesn't work with current 2.x.x
any suggestions?
#15 Updated by Bishma Stornelli Ortega 3 months ago
- File log-time-for-other-users.diff
added
I update the patch to work with version 2.2.1. I haven't tested in any other version.
Some changes were added. In a nutshell, this patch does:
- Allow users with permission :edit_time_entries to log time in a project for another user assigned to that project and with permission to log time.
- Since an admin does not need to be assigned to a project to log time in it, he/she will be added to the select list of users as "<< me >>"
- The label << me >> will appear in the select list if the available users include the current user (or if current user is admin as mentioned before).
- These log can be done either through /projects/identifier/time_entries/new or when updating an issue. Maybe I'll add later the option to update through /time_entries/new but it will require a little adittional work.
Let me know if you find any bug.
#16 Updated by Toshi MARUYAMA 3 months ago
- Tracker changed from Patch to Feature
#17 Updated by Daniel Felix 3 months ago
Maybe this could be a candidate for 2.4?
#18 Updated by Cassiano Monteiro 3 months ago
Agreed. This is definitely something I need (my co-workers are very lazy on logging their times).