From 12bbcd09668eebec687f799b0ffd86e522e10d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Fri, 9 Sep 2011 12:30:44 +0200 Subject: [PATCH] Allow subtasks to cross project boundaries. --- app/models/issue.rb | 7 +------ public/javascripts/application.js | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index cc754014db..ea3e480365 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -151,9 +151,6 @@ class Issue < ActiveRecord::Base issue.fixed_version = nil end issue.project = new_project - if issue.parent && issue.parent.project_id != issue.project_id - issue.parent_issue_id = nil - end end if new_tracker issue.tracker = new_tracker @@ -337,9 +334,7 @@ class Issue < ActiveRecord::Base # Checks parent issue assignment if @parent_issue - if @parent_issue.project_id != project_id - errors.add :parent_issue_id, :not_same_project - elsif !new_record? + if !new_record? # moving an existing issue if @parent_issue.root_id != root_id # we can always move to another tree diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 81ecda1eed..c3ce7aca81 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -336,7 +336,9 @@ function observeParentIssueField(url) { paramName: 'q', updateElement: function(value) { document.getElementById('issue_parent_issue_id').value = value.id; - }}); + }, + parameters: 'scope=all' + }); } function observeRelatedIssueField(url) {