Commit e583df54 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont override project_id params when use issues/mr filtering

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 74187621
...@@ -118,8 +118,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -118,8 +118,7 @@ class Projects::IssuesController < Projects::ApplicationController
def issues_filtered def issues_filtered
params[:scope] = 'all' if params[:scope].blank? params[:scope] = 'all' if params[:scope].blank?
params[:state] = 'opened' if params[:state].blank? params[:state] = 'opened' if params[:state].blank?
params[:project_id] = @project.id @issues = FilteringService.new.execute(Issue, current_user, params.merge(project_id: @project.id))
@issues = FilteringService.new.execute(Issue, current_user, params)
end end
# Since iids are implemented only in 6.1 # Since iids are implemented only in 6.1
......
...@@ -20,9 +20,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -20,9 +20,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
params[:sort] ||= 'newest' params[:sort] ||= 'newest'
params[:scope] = 'all' if params[:scope].blank? params[:scope] = 'all' if params[:scope].blank?
params[:state] = 'opened' if params[:state].blank? params[:state] = 'opened' if params[:state].blank?
params[:project_id] = @project.id
@merge_requests = FilteringService.new.execute(MergeRequest, current_user, params) @merge_requests = FilteringService.new.execute(MergeRequest, current_user, params.merge(project_id: @project.id))
@merge_requests = @merge_requests.page(params[:page]).per(20) @merge_requests = @merge_requests.page(params[:page]).per(20)
@sort = params[:sort].humanize @sort = params[:sort].humanize
......
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