@outliant/sunrise-utils 1.4.2 → 1.4.4

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 CHANGED
@@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [1.4.4](https://github.com/outliant/sunrise-utils/compare/1.4.3...1.4.4)
8
+
9
+ - fix: due date empty/not empty filter [`5009a26`](https://github.com/outliant/sunrise-utils/commit/5009a263100797464fb72a8c9e5e771f7666d04d)
10
+
11
+ #### [1.4.3](https://github.com/outliant/sunrise-utils/compare/1.4.2...1.4.3)
12
+
13
+ > 25 June 2025
14
+
15
+ - chore: task pipeline exclude archived tasks by default [`b4b9954`](https://github.com/outliant/sunrise-utils/commit/b4b99546e44b222c2bc7fd42157f30ed71efb883)
16
+ - chore(release): 1.4.3 [`5fd931a`](https://github.com/outliant/sunrise-utils/commit/5fd931a9dd5b9ccaed95ea7029819544885b1bf9)
17
+
7
18
  #### [1.4.2](https://github.com/outliant/sunrise-utils/compare/1.4.1...1.4.2)
8
19
 
20
+ > 24 June 2025
21
+
22
+ - chore(release): 1.4.2 [`0702182`](https://github.com/outliant/sunrise-utils/commit/0702182ea776a11e4d08f714f10d37d656b189d6)
9
23
  - chore: build fix [`b2abcdb`](https://github.com/outliant/sunrise-utils/commit/b2abcdb45682fbdece85bd25d87905a923af9c87)
10
24
 
11
25
  #### [1.4.1](https://github.com/outliant/sunrise-utils/compare/1.4.0...1.4.1)
@@ -223,6 +223,21 @@ module.exports.isEmpty = (filter) => {
223
223
  }
224
224
  };
225
225
  }
226
+
227
+ if (filter.field_type === 'date' || filter.field_type === 'number') {
228
+ return {
229
+ bool: {
230
+ must_not: [
231
+ {
232
+ exists: {
233
+ field: filter.type
234
+ }
235
+ }
236
+ ]
237
+ }
238
+ };
239
+ }
240
+
226
241
  return {
227
242
  bool: {
228
243
  should: [
@@ -284,6 +299,20 @@ module.exports.isNotEmpty = (filter) => {
284
299
  };
285
300
  }
286
301
 
302
+ if (filter.field_type === 'date' || filter.field_type === 'number') {
303
+ return {
304
+ bool: {
305
+ must: [
306
+ {
307
+ exists: {
308
+ field: filter.type
309
+ }
310
+ }
311
+ ]
312
+ }
313
+ };
314
+ }
315
+
287
316
  return {
288
317
  bool: {
289
318
  must_not: [
@@ -280,7 +280,7 @@ module.exports.defaultCustomColumns = [
280
280
  }
281
281
  ];
282
282
 
283
- module.exports.defaultTaskFilter = {
283
+ module.exports.defaultExcludeOnHoldTaskFilter = {
284
284
  bool: {
285
285
  should: [
286
286
  {
@@ -301,6 +301,27 @@ module.exports.defaultTaskFilter = {
301
301
  }
302
302
  };
303
303
 
304
+ module.exports.defaultExcludeArchivedTaskFilter = {
305
+ bool: {
306
+ should: [
307
+ {
308
+ term: {
309
+ deleted: false
310
+ }
311
+ },
312
+ {
313
+ bool: {
314
+ must_not: {
315
+ exists: {
316
+ field: 'deleted'
317
+ }
318
+ }
319
+ }
320
+ }
321
+ ]
322
+ }
323
+ };
324
+
304
325
  module.exports.defaultFilterSetting = {
305
326
  filters: [
306
327
  {
@@ -5,7 +5,8 @@ const {
5
5
  taskStatusOptions,
6
6
  taskAgeColorOptions,
7
7
  defaultCustomColumns,
8
- defaultTaskFilter,
8
+ defaultExcludeOnHoldTaskFilter,
9
+ defaultExcludeArchivedTaskFilter,
9
10
  buildTaskPipelineFilter,
10
11
  defaultFilterSetting
11
12
  } = require('../helpers/taskFilter');
@@ -86,7 +87,11 @@ class TaskPipeline {
86
87
  }
87
88
 
88
89
  if (!filters.find((f) => f.value === 'on_hold' && f.type === 'status')) {
89
- mustQuery.push(defaultTaskFilter);
90
+ mustQuery.push(defaultExcludeOnHoldTaskFilter);
91
+ }
92
+
93
+ if (!filters.find((f) => f.value === 'archived' && f.type === 'status')) {
94
+ mustQuery.push(defaultExcludeArchivedTaskFilter);
90
95
  }
91
96
 
92
97
  return { bool: { must: mustQuery } };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@outliant/sunrise-utils",
3
3
  "description": "Helper functions for project Sunrise",
4
- "version": "1.4.2",
4
+ "version": "1.4.4",
5
5
  "license": "ISC",
6
6
  "author": "Outliant",
7
7
  "main": "index.js",