diff app/models/issue.rb @ 1294:3e4c3460b6ca redmine-2.2

Update to Redmine SVN revision 11972 on 2.2-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:01:12 +0100
parents 433d4f72a19b
children 622f24f53b42 0a574315af3e 261b3d9a4903
line wrap: on
line diff
--- a/app/models/issue.rb	Mon Jan 07 12:01:42 2013 +0000
+++ b/app/models/issue.rb	Fri Jun 14 09:01:12 2013 +0100
@@ -418,7 +418,7 @@
 
     if attrs['parent_issue_id'].present?
       s = attrs['parent_issue_id'].to_s
-      unless (m = s.match(%r{\A#?(\d+)\z})) && Issue.visible(user).exists?(m[1])
+      unless (m = s.match(%r{\A#?(\d+)\z})) && (m[1] == parent_id.to_s || Issue.visible(user).exists?(m[1]))
         @invalid_parent_issue_id = attrs.delete('parent_issue_id')
       end
     end