Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

Commit 20c65f3b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Search: show recent issues/mr first

parent 94be6eee8448
......@@ -19,8 +19,8 @@ def execute
if params[:search_code].present?
result[:blobs] = project.repository.search_files(query, params[:repository_ref]) unless project.empty_repo?
result[:merge_requests] = MergeRequest.in_projects(project_ids).search(query).limit(20)
result[:issues] = Issue.where(project_id: project_ids).search(query).limit(20)
result[:merge_requests] = MergeRequest.in_projects(project_ids).search(query).order('updated_at DESC').limit(20)
result[:issues] = Issue.where(project_id: project_ids).search(query).order('updated_at DESC').limit(20)
result[:wiki_pages] = []
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