From 21cf5d2321847da390cc2073cfd427d80a443f3c Mon Sep 17 00:00:00 2001 From: Gabriel Siedler Date: Fri, 30 Mar 2018 17:30:15 -0300 Subject: [PATCH] =?UTF-8?q?fixes=20#10173=20-=20Task=20page=20search=20bar?= =?UTF-8?q?=20only=20searches=20task=20titles,=20not=20No=E2=80=A6=20(#101?= =?UTF-8?q?75)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- test/client/unit/specs/components/tasks/column.js | 8 ++++---- website/client/components/tasks/column.vue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/client/unit/specs/components/tasks/column.js b/test/client/unit/specs/components/tasks/column.js index 268fc08cd3..e1af3e0da6 100644 --- a/test/client/unit/specs/components/tasks/column.js +++ b/test/client/unit/specs/components/tasks/column.js @@ -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' }, diff --git a/website/client/components/tasks/column.vue b/website/client/components/tasks/column.vue index 0197f2f6a8..b452622998 100644 --- a/website/client/components/tasks/column.vue +++ b/website/client/components/tasks/column.vue @@ -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)) );