Option to copy subtasks when copying issue(s) (#6965).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10327 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-09-08 05:34:07 +00:00
parent ffcf1925e3
commit 5003927f13
9 changed files with 159 additions and 2 deletions
+9
View File
@@ -81,6 +81,15 @@ module ObjectHelpers
issue
end
# Generates an issue with some children and a grandchild
def Issue.generate_with_descendants!(project, attributes={})
issue = Issue.generate_for_project!(project, attributes)
child = Issue.generate_for_project!(project, :subject => 'Child1', :parent_issue_id => issue.id)
Issue.generate_for_project!(project, :subject => 'Child2', :parent_issue_id => issue.id)
Issue.generate_for_project!(project, :subject => 'Child11', :parent_issue_id => child.id)
issue.reload
end
def Version.generate!(attributes={})
@generated_version_name ||= 'Version 0'
@generated_version_name.succ!