diff options
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 8b2e9cfdee5..8472ceca329 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -23,8 +23,6 @@ class Projects::IssuesController < Projects::ApplicationController respond_to :html def index - return redirect_to_fixed_params if params[:assignee_id].present? || params[:author_id].present? - @issues = issues_collection @issues = @issues.page(params[:page]) if @issues.out_of_range? && @issues.total_pages != 0 @@ -35,6 +33,18 @@ class Projects::IssuesController < Projects::ApplicationController @labels = LabelsFinder.new(current_user, project_id: @project.id, title: params[:label_name]).execute end + @users = [] + + if params[:assignee_id].present? + assignee = User.find_by_id(params[:assignee_id]) + @users.push(assignee) if assignee + end + + if params[:author_id].present? + author = User.find_by_id(params[:author_id]) + @users.push(author) if author + end + respond_to do |format| format.html format.atom { render layout: false } @@ -213,22 +223,6 @@ class Projects::IssuesController < Projects::ApplicationController end end - def redirect_to_fixed_params - fixed_params = params.except(:assignee_id, :author_id) - - if params[:assignee_id].present? - assignee = User.find_by_id(params[:assignee_id]) - fixed_params.merge!(assignee_username: assignee.username) if assignee - end - - if params[:author_id].present? - author = User.find_by_id(params[:author_id]) - fixed_params.merge!(author_username: author.username) if author - end - - redirect_to url_for(fixed_params) - end - # Since iids are implemented only in 6.1 # user may navigate to issue page using old global ids. # |