File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -1191,10 +1191,10 @@ def self.load_visible_relations(issues, user=User.current)
1191
1191
# Returns a scope of the given issues and their descendants
1192
1192
def self . self_and_descendants ( issues )
1193
1193
Issue . joins (
1194
- "JOIN #{ Issue . table_name } ancestors" +
1195
- " ON ancestors.root_id = #{ Issue . table_name } .root_id" +
1196
- " AND ancestors.lft <= #{ Issue . table_name } .lft AND ancestors.rgt >= #{ Issue . table_name } .rgt"
1197
- ) .
1194
+ "JOIN #{ Issue . table_name } ancestors" +
1195
+ " ON ancestors.root_id = #{ Issue . table_name } .root_id" +
1196
+ " AND ancestors.lft <= #{ Issue . table_name } .lft AND ancestors.rgt >= #{ Issue . table_name } .rgt"
1197
+ ) .
1198
1198
where ( :ancestors => { :id => issues . map ( &:id ) } )
1199
1199
end
1200
1200
@@ -1417,10 +1417,11 @@ def self.update_versions_from_sharing_change(version)
1417
1417
def self . update_versions_from_hierarchy_change ( project )
1418
1418
moved_project_ids = project . self_and_descendants . reload . pluck ( :id )
1419
1419
# Update issues of the moved projects and issues assigned to a version of a moved project
1420
- Issue . update_versions (
1421
- [ "#{ Version . table_name } .project_id IN (?) OR #{ Issue . table_name } .project_id IN (?)" ,
1422
- moved_project_ids , moved_project_ids ]
1423
- )
1420
+ Issue .
1421
+ update_versions (
1422
+ [ "#{ Version . table_name } .project_id IN (?) OR #{ Issue . table_name } .project_id IN (?)" ,
1423
+ moved_project_ids , moved_project_ids ]
1424
+ )
1424
1425
end
1425
1426
1426
1427
def parent_issue_id = ( arg )
You can’t perform that action at this time.
0 commit comments