diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-11-09 11:09:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-11-09 11:09:50 +0000 |
commit | d89c968bb116e525ca5c8597037086b5b565dadf (patch) | |
tree | b952ccf53c95c849b2714f39b9acf4184a3644ab /app | |
parent | f4aff7919ab1aa6ae3437a2ded73197129892762 (diff) | |
download | redmine-d89c968bb116e525ca5c8597037086b5b565dadf.tar.gz redmine-d89c968bb116e525ca5c8597037086b5b565dadf.zip |
Accept issue id with leading sharp when adding a related issue.
git-svn-id: http://svn.redmine.org/redmine/trunk@12250 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/repositories_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 2db9c3f92..ad0ff7f13 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -229,7 +229,8 @@ class RepositoriesController < ApplicationController # Adds a related issue to a changeset # POST /projects/:project_id/repository/(:repository_id/)revisions/:rev/issues def add_related_issue - @issue = @changeset.find_referenced_issue_by_id(params[:issue_id]) + issue_id = params[:issue_id].to_s.sub(/^#/,'') + @issue = @changeset.find_referenced_issue_by_id(issue_id) if @issue && (!@issue.visible? || @changeset.issues.include?(@issue)) @issue = nil end |