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:
commit
d52df8e730
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue