giddie / redmine_default_assign

Redmine ticket #482:Default assignment setting -- converted to a plugin and then extended.
Other
34 stars 26 forks source link

after installing, configure link, project settings save and new project function are all returned with 500 internal error. #10

Closed nick-jiang closed 9 years ago

nick-jiang commented 11 years ago

INFO:

Configure link of redmine_default_assign plugin is returned with 500 error.

Processing SettingsController#plugin (for 10.3.139.16 at 2013-09-13 10:50:23) [GET]
  Parameters: {"id"=>"redmine_default_assign", "action"=>"plugin", "controller"=>"settings"}
Rendering template within layouts/admin
Rendering settings/plugin

ActionView::TemplateError (undefined method `order' for #<Class:0x7f01ba9574b0>) on line #9 of vendor/plugins/redmine_default_assign/app/views/settings/_default_assign.erb:
6:     <%= content_tag(:label, l(:label_user)) %>
7:
8:     <%-
9:       users = Principal.active.order('firstname ASC')
10:       selected = @settings['default_assignee_id'] unless @settings['default_assignee_id'].blank?
11:       selected ||= []
12:     -%>

    /usr/lib/ruby/vendor_ruby/active_record/base.rb:1998:in `method_missing'
    /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:186:in `send'
    /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:186:in `method_missing'
    /usr/lib/ruby/vendor_ruby/active_record/base.rb:2182:in `with_scope'
    /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:118:in `__send__'
    /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:118:in `with_scope'
    /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:179:in `method_missing'
    vendor/plugins/redmine_default_assign/app/views/settings/_default_assign.erb:9
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:34:in `send'
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:34:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:306:in `with_template'
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:30:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/renderable_partial.rb:20:in `render'

And also there's 500 problem when changing project's settings.

Processing ProjectsController#update (for 10.3.139.16 at 2013-09-13 10:33:19) [PUT]
  Parameters: {"_method"=>"put", "id"=>"android-ios", "authenticity_token"=>"4Kj6VzXaQjQSM7C7NCkB+7Obslx4uhdIUb12rw/y2jI=", "action"=>"update", "commit"=>"Save", "controller"=>"projects", "project"=>{"default_assignee_id"=>"", "is_public"=>"1", "tracker_ids"=>["1", "7", "2", "4", ""], "description"=>"", "issue_custom_field_ids"=>[""], "name"=>"Rainbow", "homepage"=>""}}

NoMethodError (undefined method `persisted?' for #<Project:0x7f01b2d038f0>):
  /usr/lib/ruby/vendor_ruby/active_record/attribute_methods.rb:255:in `method_missing'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `evaluate_method'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:166:in `call'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:93:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `each'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:276:in `run_callbacks'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:344:in `callback'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:249:in `create_or_update'

New project is also not available cause of assign plugin, returned with 500 error.

giddie commented 11 years ago

You're running a pretty old version of Redmine. I'm on 2.3.0.stable. Could you try updating to at least that version and trying again?

JonathanNP commented 10 years ago

Hi Giddie,

I'm currently trying to install this plugin on Redmine 2.5.1 and some functions do not works such as:

May you have any update for this Redmine version?

giddie commented 10 years ago

Hmm, oh dear. I'm afraid I don't think I'll be able to find the time to do a fresh install to check this out. I'd be happy to merge a pull request if someone is able to fix the issue, though.

giddie commented 10 years ago

FYI, the plugin works OK for me in 2.5.1, but I haven't tried installing from scratch to check the rake tasks, etc...