resolve last_reported_by vs last_updated_by duplication
This commit is contained in:
parent
79bd1777ab
commit
7b5e0d91f3
2 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue