fixes #10173 - Task page search bar only searches task titles, not No… (#10175)

* fixes #10173 - Task page search bar only searches task titles, not Notes (#10173)

* Fixing unit test: Test expect task to have note, but it has notes.
This commit is contained in:
Gabriel Siedler
2018-03-30 17:30:15 -03:00
committed by Sabe Jones
parent a6106a801b
commit 21cf5d2321
2 changed files with 5 additions and 5 deletions

View File

@@ -145,17 +145,17 @@ describe('Task Column', () => {
tasks = [
{
text: 'Hello world 1',
note: '',
notes: '',
checklist: [],
},
{
text: 'Hello world 2',
note: '',
notes: '',
checklist: [],
},
{
text: 'Generic Task Title',
note: '',
notes: '',
checklist: [
{ text: 'Check 1' },
{ text: 'Check 2' },
@@ -164,7 +164,7 @@ describe('Task Column', () => {
},
{
text: 'Hello world 3',
note: 'Generic Task Note',
notes: 'Generic Task Note',
checklist: [
{ text: 'Checkitem 1' },
{ text: 'Checkitem 2' },

View File

@@ -584,7 +584,7 @@ export default {
/* eslint-disable no-extra-parens */
return (
task.text.toLowerCase().indexOf(searchTextLowerCase) > -1 ||
(task.note && task.note.toLowerCase().indexOf(searchTextLowerCase) > -1) ||
(task.notes && task.notes.toLowerCase().indexOf(searchTextLowerCase) > -1) ||
(task.checklist && task.checklist.length > 0 &&
task.checklist.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
);