mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-23 08:51:13 +00:00
After copying a task, setting the parent as the orignal task's parent triggers an error (#17580).
git-svn-id: http://svn.redmine.org/redmine/trunk@15057 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3a48f09d4f
commit
300e5e4652
@ -1963,6 +1963,23 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert IssueRelation.exists?(relation.id)
|
||||
end
|
||||
|
||||
def test_issue_copy_should_be_able_to_be_moved_to_the_same_parent_as_copied_issue
|
||||
issue = Issue.generate!
|
||||
parent = Issue.generate!
|
||||
issue.parent_issue_id = parent.id
|
||||
issue.save!
|
||||
issue.reload
|
||||
|
||||
copy = Issue.new.copy_from(issue, :link => true)
|
||||
relation = new_record(IssueRelation) do
|
||||
copy.save!
|
||||
end
|
||||
|
||||
copy.parent_issue_id = parent.id
|
||||
assert_save copy
|
||||
assert IssueRelation.exists?(relation.id)
|
||||
end
|
||||
|
||||
def test_overdue
|
||||
assert Issue.new(:due_date => 1.day.ago.to_date).overdue?
|
||||
assert !Issue.new(:due_date => Date.today).overdue?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user