]> git.openstreetmap.org Git - rails.git/commitdiff
resolve last_reported_by vs last_updated_by duplication
authorAndy Allan <git@gravitystorm.co.uk>
Fri, 23 Feb 2018 02:18:57 +0000 (10:18 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Fri, 23 Feb 2018 02:18:57 +0000 (10:18 +0800)
app/controllers/issues_controller.rb
app/views/issues/index.html.erb

index 75eb3dd3af801bd3aa9bfe815b8bb3b873af0674..7f455b9e9290529f6eaeaf972d0288032465c234 100644 (file)
@@ -38,17 +38,11 @@ class IssuesController < ApplicationController
       @issues = @issues.where(:reportable_type => params[:issue_type][0])
     end
 
-    # If last_updated_by
     if params[:last_updated_by] && params[:last_updated_by][0].present?
       last_updated_by = params[:last_updated_by][0].to_s == "nil" ? nil : params[:last_updated_by][0].to_i
       @issues = @issues.where(:updated_by => last_updated_by)
     end
 
-    if params[:last_reported_by] && params[:last_reported_by][0].present?
-      last_reported_by = params[:last_reported_by][0].to_s == "nil" ? nil : params[:last_reported_by][0].to_i
-      @issues = @issues.where(:updated_by => last_reported_by)
-    end
-
     redirect_to issues_path, :notice => notice if notice
   end
 
index 4a6cf3c9a5a1c9a2fb438854e52d8631512d0a44..56de810c21fe3efd9446e47404962e2abdeb8468 100644 (file)
@@ -7,7 +7,7 @@
 <%= select :status, nil, [['open', 0], ['resolved', 2], ['ignored', 1]], { :include_blank => t(".select_status")}, data: { behavior: 'category_dropdown' } %>
 <%= select :issue_type, nil, @issue_types, { :include_blank => t(".select_type")}, data: { behavior: 'category_dropdown' } %>
 <%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
-<%= select :last_reported_by, nil, @users.all.collect  {|f| [f.display_name, f.id]} << [ t(".not_updated"), "nil"], { :include_blank => t(".select_last_updated_by")}, data: { behavior: 'category_dropdown' } %>
+<%= select :last_updated_by, nil, @users.all.collect  {|f| [f.display_name, f.id]} << [ t(".not_updated"), "nil"], { :include_blank => t(".select_last_updated_by")}, data: { behavior: 'category_dropdown' } %>
 <%= submit_tag t(".search") %>
 <% end %>
 <br/>