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 8 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 about 8 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 about 8 years ago
#8 Updated by Oleg Volkov about 8 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 about 7 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 7 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 over 6 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 about 5 years 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.
#19 Updated by Gary Watson over 4 years ago
- File log-time-for-other-users.diff added
A slightly updated diff that works with redmine 2.3.1 There was a small modification I had to make by hand to get the patch to apply otherwise it's the same as the one produced by Bishma Stornelli Ortega that worked with 2.2.1
#22 Updated by Pavel Potcheptsov almost 4 years ago
Paul Freund wrote:
The patch from Gary Watson also works with version 2.4.2 if you remove the diff for issue.rb. I've attatched an updated patch. All use cases we tested worked but I can't guarantee it works in all.
is there any plan to include this functionality in trunk?
#23 Updated by Alex Dergachev over 3 years ago
I just threw together a hacky plugin that seeks to achieve the same thing
It doesn't check any permissions and probably has other bugs, but it works for us on redmine 2.6 without hacking core:
#24 Updated by Patrik Halfar about 3 years ago
- File redmine_foreign_timelog.patch added
for latest version 2.6.1 I'm using following patch, is has origin in patch from this feature request, but include separete permisson, so it is possible permit this functionality for some roles only.
Intersting should be add functionality requested by #8505.