@@ -1104,7 +1104,7 class Issue < ActiveRecord::Base | |||||
1104 |
|
1104 | |||
1105 | # Returns a scope of the given issues and their descendants |
|
1105 | # Returns a scope of the given issues and their descendants | |
1106 | def self.self_and_descendants(issues) |
|
1106 | def self.self_and_descendants(issues) | |
1107 |
|
|
1107 | Issue.joins("JOIN #{Issue.table_name} ancestors" + | |
1108 | " ON ancestors.root_id = #{Issue.table_name}.root_id" + |
|
1108 | " ON ancestors.root_id = #{Issue.table_name}.root_id" + | |
1109 | " AND ancestors.lft <= #{Issue.table_name}.lft AND ancestors.rgt >= #{Issue.table_name}.rgt" |
|
1109 | " AND ancestors.lft <= #{Issue.table_name}.lft AND ancestors.rgt >= #{Issue.table_name}.rgt" | |
1110 | ). |
|
1110 | ). |
General Comments 0
You need to be logged in to leave comments.
Login now