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.
This commit is contained in:
Dmitriy Zaporozhets 2014-06-24 07:04:01 +00:00
commit d52df8e730
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class Projects::IssuesController < Projects::ApplicationController
terms = params['issue_search']
@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)
assignee_id, milestone_id = params[:assignee_id], params[:milestone_id]