Add Group Weekly Timesheet plugin
Added by Nick Blagoveshensky almost 13 years ago
If the user has permission to manage other team members, he can manage their timesheets as well. You can do so right this user could also depend on the group. Sorry, for the my bad English.
Replies (5)
RE: Add Group Weekly Timesheet plugin - Added by Dhanasingh Krishnapandian almost 13 years ago
I think the permission manage_members, is at a higher level than the group. Usually a manager or team lead would be given the manage_members permission so they should be able to manager their timesheet as well. If you are in the same group, then you are all peers, so I don't think they can manage each other's timesheet. hopefully I understood your question correctly, let me know if I misunderstood your question.
RE: Add Group Weekly Timesheet plugin - Added by Alfredo Bonilla almost 13 years ago
Hi, first of all, good plugin. It's very useful. Nevertheless, could I suggest one enhacement?:
- It would be possible some plugin setting for Control Max daily hours, with the possibility of adding the max number of hours to be assigned per day (default=8)? This would allow to control if a user logs more hours than the allowed number of hours, giving the corresponding error
RE: Add Group Weekly Timesheet plugin - Added by Dhanasingh Krishnapandian almost 13 years ago
Alfredo,
thanks for your feedback.
Actually the weekly plugin uses the Time_entry entity from core.
there is a check with in time_entry.rb to allow for hours between 0 and 1000
:invalid if hours && (hours < 0 || hours >= 1000)
May be, this is what needs to be made as a setting, then the weekly plugin also can use the same.
If you agree, may be we should request for an enhancement within Redmine Core.
Dhanasingh
RE: Add Group Weekly Timesheet plugin - Added by Alfredo Bonilla almost 13 years ago
The control I proposed was more related to the max number of hours that a user can log per day. Just trying to avoid that in some projects, a user could log more hours in a day than the allowed.
Anyway, I guess that we could add some new validation in the time_entry.rb module.
Thanks
RE: Add Group Weekly Timesheet plugin - Added by Alfredo Bonilla almost 13 years ago
Just added:
# Get number of hours of current user "today" today_hours=TimeEntry.sum("hours", :conditions => ['user_id = ? and spent_on = ?', User.current.id, spent_on]) errors.add "Number of daily hours can not be greater than 8.0" if today_hours + hours > 8
and we got what we were looking for.
Thx again