Project

General

Profile

Actions

Defect #7023

closed

Copy Function Doesn't Copy SubTasks

Added by John S almost 14 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
2010-12-02
Due date:
% Done:

90%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

The copy function does not copy the subtasks related to the task being copied. However, when you move a parent task, all subtasks are moved with it.


Files

issue.rb (31.1 KB) issue.rb Issues.rb to copy subtasks with parent tasks. John S, 2011-01-06 14:58
issue.rb.1.1.0.copy_children.patch (1.24 KB) issue.rb.1.1.0.copy_children.patch patch to merge John S's issue.rb into 1.1.0 branch Daniel Reiche, 2011-01-19 16:46
issue.rb.1.1.0.copy_children.patch (1.43 KB) issue.rb.1.1.0.copy_children.patch Revised working patch for issue.rb from 1.1.0 - r4732 Daniel Reiche, 2011-01-20 09:45

Related issues

Is duplicate of Redmine - Feature #6965: Option to Copy Subtasks when copying an issueClosedJean-Philippe Lang2010-11-23

Actions
Actions #1

Updated by John S almost 14 years ago

  • % Done changed from 0 to 90

We have been able to make changes so that when you copy a task that has subtasks related to it, all the subtasks are copied as well.

We made the changes in the issues.rb model. If anyone needs the same, let me know.

Actions #2

Updated by Yrs ONE almost 14 years ago

This functionality will be very useful for us.

Actions #3

Updated by John S almost 14 years ago

Here is a copy of the issues.rb file. You need to replace the existing issues.rb file. The changes that were made start on line 169.

Hope it helps.

Actions #4

Updated by Yrs ONE almost 14 years ago

Thanks !

Actions #5

Updated by Anonymous almost 14 years ago

I have tested it and seems to work fine, but I dont like the idea of replacing the existing issue.rb.
Could it be possible to make this "copy function" as a plugin?

Actions #6

Updated by John S almost 14 years ago

I am sure it's possible. But I don't have the knowledge or time to make that change. The source code is there... feel free to do whatever you want with it. Wish I could help out more but I already put too much time in figuring out how to make this work and testing it out.

Good Luck!

Actions #7

Updated by Anonymous almost 14 years ago

tnx I'll give it a shot!

Actions #8

Updated by Daniel Reiche almost 14 years ago

Any chance of this making it into 1.1.x or at least trunk?

Actions #9

Updated by Daniel Reiche almost 14 years ago

added patch for 1.1.0 branch to incorporate modified issue.rb from John S

Actions #10

Updated by Daniel Reiche almost 14 years ago

Beginners Mistake: accidentally merged the copy_children function as private method.
Revised in latest patch

Actions #11

Updated by Miro Karpis over 13 years ago

please, help needed: I have changed the issue.rb + restarted apache and nothing happened (when I copy main tasks it does not copy subtasks). Am I missing something?

Actions #12

Updated by John S over 13 years ago

Also restart the mongrel services?

Actions #13

Updated by Miro Karpis over 13 years ago

John S wrote:

Also restart the mongrel services?

didn't work. Not sure if the order is important (apache and mongrel).

Actions #14

Updated by John S over 13 years ago

Miro Karpis wrote:

John S wrote:

Also restart the mongrel services?

didn't work. Not sure if the order is important (apache and mongrel).

All I did was change my issues.rb file and restart all the services. If that isn't working for you, I am not sure why. Hopefully someone else can provide an answer. (Mine still works as coded)

Actions #15

Updated by Zbynek Drlik over 13 years ago

  • Assignee set to Jean-Philippe Lang

+1

Actions #16

Updated by Liam Randall over 13 years ago

Testing this on a bitnami 1.2.0 stable host:

bitnami@linux:/opt/bitnami/apps/redmine$ sudo patch p0 < /home/bitnami/redmine/patches/copy_children/issue.rb.1.1.0.copy_children.patch
patching file app/models/issue.rb
Hunk #1 succeeded at 205 (offset 28 lines).
Hunk #2 FAILED at 902.
1 out of 2 hunks FAILED -
saving rejects to file app/models/issue.rb.rej

Went ahead and tested anyway and seems to function properly.

Actions #17

Updated by Etienne Massip over 13 years ago

  • Assignee deleted (Jean-Philippe Lang)

Please don't assign issues.

Actions #18

Updated by Etienne Massip about 13 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Closed as duplicate of #6965.

Actions

Also available in: Atom PDF