Feature #14418


Copy inner issues relations along with issues

Added by Dominik Follmann about 11 years ago. Updated about 3 years ago.

Start date:
Due date:
% Done:


Estimated time:


When one or more issues are copied, the relations get lost. This is especially annoying when a structure of issues with precedes/follows or blocks/blocked by relations gets copied.

To clarify this, especially when a list of issues gets copied, there are two possible types of relations:
  • the relations which are inside the copied structure
  • the relations that point out of the copied structure

In my opinion the first type (inner relations) should be automatically mapped to the new created (copied) structure.
This would be the same behavior as when a complete project is copied. For the second type it could also be reasonable to have a setting in the bulk-copy page like "Copy outer relations", if such relations are existing in the selected structure.

I think this bugfix would even resolve request #11647 to some extent, because then it would be possible to create one "template"-project from which frequently used structures (e.g. like a software release procedure etc.) could always be copied by the users to their "real" projects.

Related issues

Related to Redmine - Feature #11647: Create Issue Structure TemplatesNewJean-Philippe Lang

Actions #1

Updated by Michael Heinze about 11 years ago


Actions #2

Updated by Etienne Massip about 11 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from Relations are not copied to Copy inner issues relations along with issues
  • Target version set to Candidate for next major release
Actions #3

Updated by Dirk Schmidt almost 11 years ago


Actions #4

Updated by Toshi MARUYAMA almost 11 years ago

Actions #5

Updated by Matthew Houston over 10 years ago

This would also be useful to us. we use a structure of issus -> child issues with set proceeds/follows as a template which is copied. At the moment the users just re-add the relationships manually but it would def add convenience to be able to maintain that.

Actions #6

Updated by Mahyar Ahmadpour-B. over 10 years ago

I suggest all proceed/follow relations should be copied. Also it would be perfect if there was an option to enable/disable creation of copied to/from relations.

Actions #7

Updated by Thomas Pihl almost 9 years ago

Much needed!

Actions #8

Updated by Sebastian Paluch almost 9 years ago


Actions #9

Updated by Hal Glenn over 7 years ago

still important and relevant

Actions #10

Updated by Jonatã Bolzan Loss over 7 years ago


Actions #11

Updated by Jakub Shanel over 5 years ago

It would be great, this feature missing me a lot

Actions #12

Updated by Philippe Vaucher about 4 years ago

This is how I do it in one of my private plugins:

# Import issues
ids = @source.issues.roots.order(:id).map do |old_issue|
  new_issue = old_issue.copy({ project: @project, notify: false }, { link: false })!

# Recreate relations
@source.issues.roots.order(:id).each do |old_issue|
  old_issue.relations_from.each do |relation|
    attributes = relation.attributes.except('id')
    attributes['issue_from_id'] = ids[attributes['issue_from_id']]
    attributes['issue_to_id'] = ids[attributes['issue_to_id']]

I don't have time to make a patch for Issue#copy, but above code should be simple enough for others to be able to make a patch out of it.

Actions #13

Updated by Mike Furminsky about 3 years ago

Selling a soul for this very necessary functionality. If someone made a patch, please share.
Redmine 4.1.1


Also available in: Atom PDF