Allow the current user to record the time spent by another one.
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.
#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.
#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.
#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.
#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.