@outliant/sunrise-utils 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/helpers/common.js +36 -0
- package/helpers/projectFilter/criticalPathFilter.js +6 -0
- package/helpers/projectFilter/index.js +1 -1
- package/helpers/projectFilter/isPausedFilter.js +41 -0
- package/helpers/projectFilter/projectFieldFilter.js +6 -0
- package/helpers/projectFilter/projectFilter.js +7 -1
- package/helpers/projectFilter/regionFilter.js +7 -1
- package/helpers/projectFilter/tagFilter.js +6 -0
- package/helpers/taskFilter/criticalPathFilter.js +6 -0
- package/helpers/taskFilter/isPausedFilter.js +37 -12
- package/helpers/taskFilter/onHoldFilter.js +7 -1
- package/helpers/taskFilter/ownerFilter.js +6 -0
- package/helpers/taskFilter/regionFilter.js +7 -1
- package/helpers/taskFilter/statusFilter.js +7 -1
- package/helpers/taskFilter/taskFieldFilter.js +6 -0
- package/helpers/users/filters/status.js +8 -1
- package/lib/fieldConditions.js +20 -0
- package/package.json +1 -1
- package/test/helpers/isNoneOf.spec.js +139 -0
- package/test/helpers/projectFilter/projectFieldFilter.spec.js +154 -1
- package/test/helpers/taskFilter/criticalPathFilter.spec.js +104 -1
- package/test/helpers/taskFilter/onHoldFilter.spec.js +94 -0
- package/test/helpers/taskFilter/ownerFilter.spec.js +94 -0
- package/test/helpers/taskFilter/regionFilter.spec.js +94 -0
- package/test/helpers/taskFilter/statusFilter.spec.js +97 -1
- package/test/helpers/taskFilter/taskFieldFilter.spec.js +94 -0
|
@@ -341,6 +341,100 @@ describe('taskFieldFilter', function () {
|
|
|
341
341
|
second_value: ''
|
|
342
342
|
},
|
|
343
343
|
output: null
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
input: {
|
|
347
|
+
condition: 'is_none_of',
|
|
348
|
+
field_id: '',
|
|
349
|
+
type: 'project_id',
|
|
350
|
+
field_type: 'text',
|
|
351
|
+
value: 'meow1;meow2',
|
|
352
|
+
second_value: ''
|
|
353
|
+
},
|
|
354
|
+
output: {
|
|
355
|
+
bool: {
|
|
356
|
+
must_not: [
|
|
357
|
+
{
|
|
358
|
+
bool: {
|
|
359
|
+
must: [
|
|
360
|
+
{ term: { project_id: { value: 'meow1' } } }
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
bool: {
|
|
366
|
+
must: [
|
|
367
|
+
{ term: { project_id: { value: 'meow2' } } }
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
input: {
|
|
377
|
+
condition: 'is_none_of',
|
|
378
|
+
field_id: '',
|
|
379
|
+
type: 'project_id',
|
|
380
|
+
field_type: 'text',
|
|
381
|
+
value: ['meow1', 'meow2'],
|
|
382
|
+
second_value: ''
|
|
383
|
+
},
|
|
384
|
+
output: {
|
|
385
|
+
bool: {
|
|
386
|
+
must_not: [
|
|
387
|
+
{
|
|
388
|
+
bool: {
|
|
389
|
+
must: [
|
|
390
|
+
{ term: { project_id: { value: 'meow1' } } }
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
bool: {
|
|
396
|
+
must: [
|
|
397
|
+
{ term: { project_id: { value: 'meow2' } } }
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
input: {
|
|
407
|
+
condition: 'is_none_of',
|
|
408
|
+
field_id: '',
|
|
409
|
+
type: 'project_id',
|
|
410
|
+
field_type: 'text',
|
|
411
|
+
value: 'meow',
|
|
412
|
+
second_value: ''
|
|
413
|
+
},
|
|
414
|
+
output: {
|
|
415
|
+
bool: {
|
|
416
|
+
must_not: [
|
|
417
|
+
{
|
|
418
|
+
bool: {
|
|
419
|
+
must: [
|
|
420
|
+
{ term: { project_id: { value: 'meow' } } }
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
input: {
|
|
430
|
+
condition: 'is_none_of',
|
|
431
|
+
field_id: '',
|
|
432
|
+
type: 'project_id',
|
|
433
|
+
field_type: 'text',
|
|
434
|
+
value: null,
|
|
435
|
+
second_value: ''
|
|
436
|
+
},
|
|
437
|
+
output: null
|
|
344
438
|
}
|
|
345
439
|
];
|
|
346
440
|
|