Commit 4ba24381 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '327106-remove-source_project_id-from-basic-search-for-merge-requests' into 'master'

Remove source_project_id from basic search for merge requests

See merge request gitlab-org/gitlab!67977
parents 858cb742 724b645a
......@@ -188,7 +188,7 @@ module Gitlab
merge_requests = MergeRequestsFinder.new(current_user, issuable_params).execute
unless default_project_filter
merge_requests = merge_requests.in_projects(project_ids_relation)
merge_requests = merge_requests.of_projects(project_ids_relation)
end
apply_sort(merge_requests, scope: 'merge_requests')
......
......@@ -148,13 +148,13 @@ RSpec.describe Gitlab::SearchResults do
end
end
it 'includes merge requests from source and target projects' do
it 'does not include merge requests from source projects' do
forked_project = fork_project(project, user)
merge_request_2 = create(:merge_request, target_project: project, source_project: forked_project, title: 'foo')
results = described_class.new(user, 'foo', Project.where(id: forked_project.id))
expect(results.objects('merge_requests')).to include merge_request_2
expect(results.objects('merge_requests')).not_to include merge_request_2
end
describe '#merge_requests' do
......
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