Commit d52df8e7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'issues-filter-by-description' into 'master'

Issues filter by description

In Issues section of any project there is a filter box, which by default says 'Filter by title or description' - so this behaviour is desired. But in fact only filter by title works and filter by description DOESN'T work. This fix adds description fitlering.
parents ddd8f707 36a5bbcc
...@@ -20,7 +20,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -20,7 +20,7 @@ class Projects::IssuesController < Projects::ApplicationController
terms = params['issue_search'] terms = params['issue_search']
@issues = issues_filtered @issues = issues_filtered
@issues = @issues.where("title LIKE ?", "%#{terms}%") if terms.present? @issues = @issues.where("title LIKE ? OR description LIKE ?", "%#{terms}%", "%#{terms}%") if terms.present?
@issues = @issues.page(params[:page]).per(20) @issues = @issues.page(params[:page]).per(20)
assignee_id, milestone_id = params[:assignee_id], params[:milestone_id] assignee_id, milestone_id = params[:assignee_id], params[:milestone_id]
......
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