mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-11 18:13:52 +02:00
Updated the filter condition for notContains (#4152)
This commit is contained in:
parent
037e951141
commit
f0342097c9
@ -335,4 +335,17 @@ describe('src/cardFilter', () => {
|
||||
expect(result[0]).toEqual(card1)
|
||||
})
|
||||
})
|
||||
describe('verify applyFilter for title', () => {
|
||||
test('should not return array with card1', () => {
|
||||
const filterClauseNotContains = createFilterClause({propertyId: 'title', condition: 'notContains', values: ['card1']})
|
||||
const filterGroup = createFilterGroup({
|
||||
operation: 'and',
|
||||
filters: [
|
||||
filterClauseNotContains,
|
||||
],
|
||||
})
|
||||
const result = CardFilter.applyFilterGroup(filterGroup, [], [card1])
|
||||
expect(result.length).toEqual(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -89,7 +89,7 @@ class CardFilter {
|
||||
if (filter.values.length === 0) {
|
||||
return true
|
||||
}
|
||||
return (value as string || '').includes(filter.values[0])
|
||||
return !(value as string || '').includes(filter.values[0])
|
||||
}
|
||||
case 'startsWith': {
|
||||
if (filter.values.length === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user