pvdvreede-old / round_robin

Redmine plugin to auto assign to members on group assignment via round robin.
GNU General Public License v3.0
3 stars 2 forks source link

Redmine 1.x #3

Open razb opened 12 years ago

razb commented 12 years ago

Any chance of getting this to be compatble with Redmine 1.x?

We're planning to migrate to 2.x, but its taking a while due to the large numbers of plugins that are still not 2.x compatible.

Changing the routes to be 1.x compatible generates the following error when accessing the Round Robin settings:

A NoMethodError occurred in round_robin_setting#index:

  undefined method `includes' for #
  [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1998:in `method_missing'

[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1998:in `method_missing'
  [RAILS_ROOT]/vendor/plugins/round_robin/app/controllers/round_robin_setting_controller.rb:27:in `index'

razb commented 12 years ago

I have it working with 1.x

We use categories with group assignments and the plugin was short-circuiting too soon.

Had to change

    return if self.assigned_to_id == nil 

to

    return if self.assigned_to_id == nil && self.category.assigned_to_id.blank?
pvdvreede commented 12 years ago

Good point about auto assigning from categories. That is also in Redmine 2.x isnt it? If this is a bug I will add in the code...?