Project

General

Profile

Timesheet & 0.9

Added by herman cremer almost 15 years ago

I am getting this when using my timesheet plugin, running
version 0.9

Processing TimesheetController#index (for 192.168.1.25 at 2009-12-29 13:49:19) [GET]
Parameters: {"action"=>"index", "controller"=>"timesheet"}

NoMethodError (undefined method `get_values' for #<Class:0x7f184b597ff8>):
vendor/plugins/timesheet_plugin/app/controllers/timesheet_controller.rb:107:in `get_activities'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering /var/www/redmine.integrat.co.za/application/public/500.html (500 Internal Server Error)

Any ideas ?


Replies (9)

RE: Timesheet & 0.9 - Added by Albrecht Backhaus almost 15 years ago

I have the same problem and it occurs with the bulk time entry plugin too.

RE: Timesheet & 0.9 - Added by Nanda P almost 15 years ago

Same with "Stuff To Do" plugin:

Processing StuffToDoController#index (for 10.10.2.25 at 2009-12-29 14:24:02) [GET]
  Parameters: {"action"=>"index", "controller"=>"stuff_to_do"}

NoMethodError (undefined method `get_values' for #<Class:0x45fdd50>):
  vendor/plugins/stuff_to_do_plugin/app/models/stuff_to_do_filter.rb:33:in `get_priorites'
  vendor/plugins/stuff_to_do_plugin/app/models/stuff_to_do_filter.rb:8:in `initialize'
  vendor/plugins/stuff_to_do_plugin/app/controllers/stuff_to_do_controller.rb:55:in `new'
  vendor/plugins/stuff_to_do_plugin/app/controllers/stuff_to_do_controller.rb:55:in `filters_for_view'
  vendor/plugins/stuff_to_do_plugin/app/controllers/stuff_to_do_controller.rb:14:in `index'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
  C:/Program Files/Ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering C:/Program Files/redmine/current/public/500.html (500 Error)

RE: Timesheet & 0.9 - Added by Nanda P almost 15 years ago

  • 500 Error with following 3 Plugins
    1. Bulk time entries
    2. Stuff To Do
    3. Timesheet

RE: Timesheet & 0.9 - Added by Eric Davis almost 15 years ago

I've just released the Bulk Time Entry plugin 0.4.0 which should be compatible with Redmine 0.9. I'm going to test the Timesheet plugin next.

It's going to take a few days (weeks) before I have updates for every plugin. Each plugin is taking 2-3 hours to test the compatibility with all three versions of Redmine (0.8, 0.9, trunk).

Eric Davis

RE: Timesheet & 0.9 - possible fix - Added by Vlad Ershov almost 15 years ago

It seems it's enough to make the following changes in ./vendor/plugins/timesheet_plugin/lib/redmine_compatibility.rb file:
  • if TimeEntryActivity.respond_to?(:active)
    return TimeEntryActivity.shared.active*
    elsif ::Enumeration.respond_to?(:activities)
    return ::Enumeration.activities
def self.activities

RE: Timesheet & 0.9 - possible fix - Added by Charles AMPEAU almost 15 years ago

Vlad Ershov wrote:

It seems it's enough to make the following changes in ./vendor/plugins/timesheet_plugin/lib/redmine_compatibility.rb file:

def self.activities
  • if TimeEntryActivity.respond_to?(:active)
    return TimeEntryActivity.shared.active*
    elsif ::Enumeration.respond_to?(:activities)
    return ::Enumeration.activities

Hi Vlad,

Please, could you post the whole file or patch, because I think the forum erase the format.

Thanks and regards

RE: Timesheet & 0.9 - Added by Vlad Ershov almost 15 years ago

Here you are.
Good luck.

# Wrappers around the Redmine core API changes between versions
module RedmineCompatibility
  class Enumeration
    # Wrapper around Redmine's API since Enumerations changed in r2472
    # This can be removed once 0.9.0 is stable
    def self.activities
      if TimeEntryActivity.respond_to?(:active)
        return TimeEntryActivity.shared.active
      elsif ::Enumeration.respond_to?(:activities)
        return ::Enumeration.activities
      else
        return ::Enumeration::get_values('ACTI')
      end
    end
  end
end

RE: Timesheet & 0.9 - Added by Charles AMPEAU almost 15 years ago

Perfect! Thanks you Vlad for your quick answer!

    (1-9/9)