This is a fork of the standard schedules plugin in redmine with an added feature that allows users to select either a monthly view or a weekly view in the forms and reports
Other
7
stars
3
forks
source link
divided by 0 when calling report per day per member #11
The reason seems to be that the logged_total var has value zero, because no hours are logged for some users.
I added "if logged_total > 0" to skip if value is 0
So line app/views/schedules/_report_criteria.html.erb:28 changed to
F, [2011-08-29T14:38:34.233379 #31138] FATAL -- :
ActionView::TemplateError (divided by 0) on line #28 of vendor/plugins/redmine_schedules/app/views/schedules/_report_criteria.html.erb:
25: <% end -%>
26:
The reason seems to be that the logged_total var has value zero, because no hours are logged for some users. I added "if logged_total > 0" to skip if value is 0 So line app/views/schedules/_report_criteria.html.erb:28 changed to
F, [2011-08-29T14:38:34.233379 #31138] FATAL -- : ActionView::TemplateError (divided by 0) on line #28 of vendor/plugins/redmine_schedules/app/views/schedules/_report_criteria.html.erb: 25: <% end -%> 26: