Actions
Defect #18917
closedCannot reorder root issues
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Wont fix
Affected version:
Description
I would like to order root issues relative to each other.
I can do the following for children nodes:
issue_a.move_to_right_of(issue_b)
However, the same code does not work for root issues, because they have different scopes (root_id
).
# app/models/issue.rb
47: acts_as_nested_set :scope => 'root_id', :dependent => :destroy
# lib/plugins/awesome_nested_set/lib/awesome_nested_set/model/movable.rb
9: def move_possible?(target)
self != target && # Can't target self
same_scope?(target) && # can't be in different scopes
# detect impossible move
within_bounds?(target.left, target.left) &&
within_bounds?(target.right, target.right)
end
Environment: Redmine version 2.6.0.stable Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux] Rails version 3.2.19 Environment production Database adapter Mysql2
(initially posted as
)
Actions