Defect #18622
closed
Awesome nested set. Need to update.
Added by Vasil Kovalevsky almost 10 years ago.
Updated almost 10 years ago.
Description
Hello. In rm 2.6 you are using older version of awesome_nested_set, which has the bug in method move_to_root.
Code from lib, which using in rm 2.6:
def move_to_root
move_to_right_of(root)
end
Its fail for every call.
Code of current version of lib (was fixed in 2013 !!! now will be 2015 soon):
def move_to_root
move_to self, :root
end
It very important for us. Can you update lib in your repository ? And i did not figure our which version of lib you are using (2.1.7 does not exist in official repository)
Step-by-step:
- using default redmine 2.6 without 3-rd party plugins
- created just 1 issue - Issue 1
- go to dir with application (redmine)
- put "rails c"
- put "Issue.first.move_to_root" (just example, you can use this method from some place for any instance of model marked like acts_as_nested_set)
- error:
ActiveRecord::ActiveRecordError: Impossible move, target node cannot be inside moved tree.
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/move.rb:115:in `prevent_impossible_move'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/move.rb:14:in `move'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb:97:in `block (2 levels) in move_to'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activerecord-3.2.20/lib/active_record/transactions.rb:208:in `transaction'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activerecord-3.2.20/lib/active_record/transactions.rb:250:in `transaction'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/transactable.rb:11:in `in_tenacious_transaction'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb:93:in `block in move_to'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:403:in `_run__1031626229__move__194490682__callbacks'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `__run_callback'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:385:in `_run_move_callbacks'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb:92:in `move_to'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb:34:in `move_to_right_of'
from /usr/share/srv-redmine/redmine-2.6/lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb:55:in `move_to_root'
from (irb):3
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/railties-3.2.20/lib/rails/commands/console.rb:47:in `start'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/railties-3.2.20/lib/rails/commands/console.rb:8:in `start'
from /home/user/.rvm/gems/ruby-1.9.3-head@rails3/gems/railties-3.2.20/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
There is no bug in redmine 2.5
I know, thats for rails 4, but the fix (link above) can easy (without any additional changes) apply to lib from 2.6 and works fine for rails 3.
- Status changed from New to Closed
- Resolution set to Wont fix
Redmine trunk no longer uses awesome_nested_set, see r13841.
Also available in: Atom
PDF