eyp/redmine_spent_time

Undefined method format_hours

Closed this issue · 10 comments

Hi, I've got en issues after updating this module.
In my logfile

ActionView::Template::Error (undefined method format_hours' for #<#<Class:0x007fe4f455db98>:0x007fe4fbbd2fd0>): 1: <div id="time_entries_report"> 2: <div class="total-hours"> 3: <p><%= t(:label_total_time) %> <%= format_hours(@entries.sum(:hours).to_f) %> <%= l(:field_hours) %> / <span style="font-weight: normal;"><%= t(:label_total_estimated_time) %> <%= format_hours(@total_estimated_time) %> <%= l(:field_hours) %></span></p> 4: </div> 5: 6: <table class="list time-entries"> plugins/redmine_spent_time/app/views/spent_time/_time_entries_report.html.erb:3:in _plugins_redmine_spent_time_app_views_spent_time__time_entries_report_html_erb__3343373034121870399_70310663132540'
plugins/redmine_spent_time/app/views/spent_time/index.html.erb:30:in _plugins_redmine_spent_time_app_views_spent_time_index_html_erb___2434290802448193975_70310664231700' lib/redmine/sudo_mode.rb:63:in sudo_mode'

Do you have any idea ?

eyp commented

What version of Redmine are you using?

Sorry, i forgot it

Environment:
Redmine version 3.2.0.stable.15058
Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
Rails version 4.2.5
Environment production
Database adapter Mysql2

eyp commented

Unfortunately last updates have broken the compaibility with Redmine versions prior to 3.4
This issue has broken that compatibility... #104
The README file is not updated with last issues because I was expecting to finish another issue faster, but it's been delayed. You must downgrade the plugin to the last release found in the releases page, or upgrade Redmine to >= 3.4

eyp commented

I think is not bad idea to upgrade Readmine to last version since it's not needed to upgrade Rails either Ruby

Ok so how to downgrade this plugins ?

eyp commented

Just go to https://github.com/eyp/redmine_spent_time/releases page, download the zip file and decompress it in the plugins folder

eyp commented

It's not needed anything else since the database was not modified

Ok thanks. I've downgrade the plugin, i will upgrade redmine to 3.4 when i will get time to do it :-)

Thanks for your quick reply.

eyp commented

Sorry, I think I'm messing or complicating the things.... Or just download the plugin repo previous to that commit:

https://github.com/eyp/redmine_spent_time/tree/8a1f56c9233f775d77039a11da132514ef43baa9

This link should be compatible with your Redmine version and is more up to date that the last release listed in the releases page.