summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-11 17:25:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-11 17:25:05 +0000
commit12b71ebc8e9de6ebb8e1bdf96928422f8a63bd81 (patch)
tree169a1f4178332e3d806d4b1f985037816b960020 /app/controllers
parent04e7b18869eed8824ffd33ebc69dc99e0aab13e0 (diff)
downloadredmine-12b71ebc8e9de6ebb8e1bdf96928422f8a63bd81.tar.gz
redmine-12b71ebc8e9de6ebb8e1bdf96928422f8a63bd81.zip
Strip issue id when adding a relation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9384 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issue_relations_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb
index ec87db727..b032d1769 100644
--- a/app/controllers/issue_relations_controller.rb
+++ b/app/controllers/issue_relations_controller.rb
@@ -42,7 +42,7 @@ class IssueRelationsController < ApplicationController
def create
@relation = IssueRelation.new(params[:relation])
@relation.issue_from = @issue
- if params[:relation] && m = params[:relation][:issue_to_id].to_s.match(/^#?(\d+)$/)
+ if params[:relation] && m = params[:relation][:issue_to_id].to_s.strip.match(/^#?(\d+)$/)
@relation.issue_to = Issue.visible.find_by_id(m[1].to_i)
end
saved = @relation.save