Fixed that entering #nnn as parent task should validate (#11979).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10658 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2012-10-14 14:35:57 +00:00
1 parent 5aaf9c734c
commit 4b6b568635
2 files changed
+18 -5

No files matched your search

+2 -1
View File
@@ -416,7 +416,8 @@ class Issue < ActiveRecord::Base
end
if attrs['parent_issue_id'].present?
unless Issue.visible(user).exists?(attrs['parent_issue_id'].to_i)
s = attrs['parent_issue_id'].to_s
unless (m = s.match(%r{\A#?(\d+)\z})) && Issue.visible(user).exists?(m[1])
@invalid_parent_issue_id = attrs.delete('parent_issue_id')
end
end