How to order root issues?
Added by @ go2null almost 12 years ago
I would like to order root issues relative to each other.
I can do the following for children nodes:
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
Any help would be appreciated.
Replies (1)
RE: How to order root issues?
-
Added by @ go2null almost 12 years ago
created Defect #18917.