Commit 1f1eed47 authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'fix-autocomplete-new-issues' into 'master'

Fix autocomplete for new issues/MRs/snippets

Fixes gitlab-org/gitlab-ce#8067

See merge request !2446
parent afda4835
......@@ -49,7 +49,7 @@ class Projects::IssuesController < Projects::ApplicationController
assignee_id: ""
)
@issue = @project.issues.new(issue_params)
@issue = @noteable = @project.issues.new(issue_params)
respond_with(@issue)
end
......
......@@ -90,6 +90,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def new
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
@merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params).execute
@noteable = @merge_request
@target_branches = if @merge_request.target_project
@merge_request.target_project.repository.branch_names
......
......@@ -25,7 +25,7 @@ class Projects::SnippetsController < Projects::ApplicationController
end
def new
@snippet = @project.snippets.build
@snippet = @noteable = @project.snippets.build
end
def create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment