Defect #5473

adding parent when cross project

Added by Burt Culver about 12 years ago. Updated almost 11 years ago.

Status:ClosedStart date:2010-05-08
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:-
Resolution:Wont fix Affected version:


Using redmine r:3683 I'm unable to change an issue to have a parent issue that is from a different project with cross_project_issue_relations set to 1. This fixes:

svn diff app/models/issue.rb
Index: app/models/issue.rb ===================================================================
--- app/models/issue.rb (revision 3683)
+++ app/models/issue.rb (working copy)
@ -291,7 +291,7 @ # Checks parent issue assignment
if @parent_issue
if @parent_issue.project_id != project_id
- errors.add :parent_issue_id, :not_same_project
+ errors.add :parent_issue_id, :not_same_project unless Setting.cross_project_issue_relations?
elsif !new_record? # moving an existing issue
if @parent_issue.root_id != root_id

Related issues

Related to Redmine - Feature #5487: Allow subtasks to cross projects Closed 2010-05-09


#1 Updated by Felix Schäfer about 12 years ago

  • Assignee set to Jean-Philippe Lang
  • Affected version (unused) set to devel

The cross-project issue relations setting is not for subtasks but only for the related issues feature. AFAIK the subtasks feature is only meant to be used inside a project.

I've assigned this jplang so he can share his thoughts.

#2 Updated by Jean-Philippe Lang about 12 years ago

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

Indeed, subtasks can not belong to a different project.
That's how it works now, fill a feature request if needed.

#3 Updated by Burt Culver about 12 years ago

#5487 created.

#4 Updated by Andy Dufilie almost 11 years ago

To add this feature to my copy, I also changed the following inside move_to_project_without_transaction function:

@ -166,7 +166,7 @
issue.fixed_version = nil
issue.project = new_project
- if issue.parent && issue.parent.project_id != issue.project_id
+ if issue.parent && issue.parent.project_id != issue.project_id && !Setting.cross_project_issue_relations?
issue.parent_issue_id = nil

Also available in: Atom PDF