@outliant/sunrise-utils 1.3.8 → 1.3.10

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,9 +4,23 @@ 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.3.10](https://github.com/outliant/sunrise-utils/compare/1.3.9...1.3.10)
8
+
9
+ - chore: task_age updates [`02ad141`](https://github.com/outliant/sunrise-utils/commit/02ad141886dc8ae4a16da3173a016402316fbae3)
10
+
11
+ #### [1.3.9](https://github.com/outliant/sunrise-utils/compare/1.3.8...1.3.9)
12
+
13
+ > 22 March 2025
14
+
15
+ - chore: updated project pipeline critical path filter [`65eab79`](https://github.com/outliant/sunrise-utils/commit/65eab7911843b69045eb5ce8e2ba43e18982c15c)
16
+ - chore(release): 1.3.9 [`b8b7218`](https://github.com/outliant/sunrise-utils/commit/b8b7218eb9a38200f3f6f47aaec6e3ec36ea5a0a)
17
+
7
18
  #### [1.3.8](https://github.com/outliant/sunrise-utils/compare/1.3.7...1.3.8)
8
19
 
20
+ > 20 March 2025
21
+
9
22
  - chore: update global search #86b428rnf [`#46`](https://github.com/outliant/sunrise-utils/pull/46)
23
+ - chore(release): 1.3.8 [`1d4512f`](https://github.com/outliant/sunrise-utils/commit/1d4512f0b7c3be8db0558c2a766b1d1807b53d9d)
10
24
 
11
25
  #### [1.3.7](https://github.com/outliant/sunrise-utils/compare/1.3.6...1.3.7)
12
26
 
@@ -6,20 +6,21 @@ module.exports = (filter) => {
6
6
  case 'is_equal':
7
7
  return module.exports.isEqual(filter);
8
8
  case 'contains_any':
9
+ case 'is_any_of':
9
10
  return module.exports.containsAny(filter);
10
11
  case 'contains_none':
11
12
  case 'not_equal':
12
13
  return module.exports.containsNone(filter);
13
14
  case 'is_none_of':
14
- return isNoneOf(
15
- filter,
16
- module.exports.isEqual
17
- );
15
+ return isNoneOf(filter, module.exports.isEqual);
18
16
  case 'greater_than_or_equal':
19
17
  return module.exports.greaterThanOrEqual(filter);
20
18
  case 'less_than_or_equal':
21
19
  return module.exports.lessThanOrEqual(filter);
22
-
20
+ case 'is_empty':
21
+ return module.exports.isEmpty();
22
+ case 'is_not_empty':
23
+ return module.exports.isNotEmpty();
23
24
  default:
24
25
  return null;
25
26
  }
@@ -122,3 +123,69 @@ module.exports.lessThanOrEqual = (filter) => {
122
123
  }
123
124
  };
124
125
  };
126
+
127
+ module.exports.isEmpty = () => {
128
+ return {
129
+ bool: {
130
+ should: [
131
+ {
132
+ bool: {
133
+ must_not: [
134
+ {
135
+ exists: {
136
+ field: 'critical_path'
137
+ }
138
+ }
139
+ ]
140
+ }
141
+ },
142
+ {
143
+ bool: {
144
+ must_not: [
145
+ {
146
+ exists: {
147
+ field: 'critical_path.stage_id'
148
+ }
149
+ }
150
+ ]
151
+ }
152
+ },
153
+ {
154
+ term: {
155
+ 'critical_path.stage_id': {
156
+ value: ''
157
+ }
158
+ }
159
+ }
160
+ ]
161
+ }
162
+ };
163
+ };
164
+
165
+ module.exports.isNotEmpty = () => {
166
+ return {
167
+ bool: {
168
+ must: [
169
+ {
170
+ exists: {
171
+ field: 'critical_path'
172
+ }
173
+ },
174
+ {
175
+ exists: {
176
+ field: 'critical_path.stage_id'
177
+ }
178
+ }
179
+ ],
180
+ must_not: [
181
+ {
182
+ term: {
183
+ 'critical_path.stage_id': {
184
+ value: ''
185
+ }
186
+ }
187
+ }
188
+ ]
189
+ }
190
+ };
191
+ };
@@ -274,7 +274,7 @@ module.exports.defaultCustomColumns = [
274
274
  type: 'task_age',
275
275
  field_type: 'select',
276
276
  options: module.exports.taskAgeColorOptions,
277
- select_fields: []
277
+ select_fields: ['ready_at']
278
278
  }
279
279
  ];
280
280
 
@@ -129,6 +129,7 @@ class TaskPipeline {
129
129
  taskPipelinesSort.push(sortScript.projectId(sort));
130
130
  break;
131
131
 
132
+ case s === 'task_age':
132
133
  case s === 'ready_at':
133
134
  taskPipelinesSort.push(sortScript.readyAt(sort));
134
135
  break;
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.3.8",
4
+ "version": "1.3.10",
5
5
  "license": "ISC",
6
6
  "author": "Outliant",
7
7
  "main": "index.js",