summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/repositories_controller.rb3
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