Project

General

Profile

Actions

Defect #18917

closed

Cannot reorder root issues

Added by @ go2null over 9 years ago. Updated over 9 years ago.

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 How to order root issues?)

Actions #1

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

Redmine 2.6 uses awesome_nested_set 2-1-stable branch (r13145) and it has many bugs.
Redmine 2.6 workarounds these bugs.
For example: source:tags/2.6.1/app/models/issue.rb#L1316 .

awesome_nested_set 2-1-stable branch is obsolete.

Actions

Also available in: Atom PDF