From f99535bba2840b141a6f836e152397bc706ddeb4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 20 Jan 2013 16:41:31 +0000 Subject: "Parent task is invalid" while editing child issues with restricted Issues Visibility (#12851). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11228 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/issue.rb b/app/models/issue.rb index 0714933c9..5d2bf24c7 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -430,7 +430,7 @@ class Issue < ActiveRecord::Base 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 -- cgit v1.2.3