@outliant/sunrise-utils 1.3.3 → 1.3.5
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 +14 -0
- package/helpers/taskFilter/index.js +2 -2
- package/lib/projectPipeline.js +15 -7
- package/package.json +1 -1
- package/test/lib/projectPipeline.spec.js +50 -1
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.3.5](https://github.com/outliant/sunrise-utils/compare/1.3.4...1.3.5)
|
|
8
|
+
|
|
9
|
+
- chore: global search updates #86b428rnf [`#44`](https://github.com/outliant/sunrise-utils/pull/44)
|
|
10
|
+
|
|
11
|
+
#### [1.3.4](https://github.com/outliant/sunrise-utils/compare/1.3.3...1.3.4)
|
|
12
|
+
|
|
13
|
+
> 12 March 2025
|
|
14
|
+
|
|
15
|
+
- chore(release): 1.3.4 [`d54041f`](https://github.com/outliant/sunrise-utils/commit/d54041fd7a9818598f29c9e1e1a04465d4ac8f89)
|
|
16
|
+
- chore: minor change [`d76dce2`](https://github.com/outliant/sunrise-utils/commit/d76dce28e644091321aef72bd68cc853a6e1b1e4)
|
|
17
|
+
|
|
7
18
|
#### [1.3.3](https://github.com/outliant/sunrise-utils/compare/1.3.2...1.3.3)
|
|
8
19
|
|
|
20
|
+
> 12 March 2025
|
|
21
|
+
|
|
22
|
+
- chore(release): 1.3.3 [`c4d65f4`](https://github.com/outliant/sunrise-utils/commit/c4d65f4c389cd4bb6505055c975c040bad3a8a01)
|
|
9
23
|
- chore: minor change [`95894aa`](https://github.com/outliant/sunrise-utils/commit/95894aae6027fddfa63c4c7cd283452ad2846805)
|
|
10
24
|
|
|
11
25
|
#### [1.3.2](https://github.com/outliant/sunrise-utils/compare/1.3.1...1.3.2)
|
package/lib/projectPipeline.js
CHANGED
|
@@ -30,13 +30,21 @@ class ProjectPipeline {
|
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
if (departmentId) {
|
|
33
|
-
mustQuery.push(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
mustQuery.push(
|
|
34
|
+
Array.isArray(departmentId)
|
|
35
|
+
? {
|
|
36
|
+
terms: {
|
|
37
|
+
department_id: departmentId
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
: {
|
|
41
|
+
term: {
|
|
42
|
+
department_id: {
|
|
43
|
+
value: departmentId
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
if (query.search && query.search.length > 0) {
|
package/package.json
CHANGED
|
@@ -164,6 +164,55 @@ describe('projectPipeline', function () {
|
|
|
164
164
|
]
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
search: '41853',
|
|
170
|
+
departmentId: [DEPARTMENT_ID, 'test-departmentId-2'],
|
|
171
|
+
expected: {
|
|
172
|
+
bool: {
|
|
173
|
+
must: [
|
|
174
|
+
{
|
|
175
|
+
term: {
|
|
176
|
+
organization_id: {
|
|
177
|
+
value: ORG_ID
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
terms: {
|
|
183
|
+
department_id: [
|
|
184
|
+
DEPARTMENT_ID,
|
|
185
|
+
'test-departmentId-2'
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
bool: {
|
|
191
|
+
should: [
|
|
192
|
+
{
|
|
193
|
+
wildcard: {
|
|
194
|
+
id: {
|
|
195
|
+
value: '*41853*'
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
multi_match: {
|
|
201
|
+
query: '41853',
|
|
202
|
+
fields: ['project_id^5']
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
match_phrase_prefix: {
|
|
207
|
+
name: '41853'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
167
216
|
}
|
|
168
217
|
];
|
|
169
218
|
|
|
@@ -175,7 +224,7 @@ describe('projectPipeline', function () {
|
|
|
175
224
|
|
|
176
225
|
const result = projectPipeline.buildFiltersQuery(
|
|
177
226
|
ORG_ID,
|
|
178
|
-
DEPARTMENT_ID,
|
|
227
|
+
entry.departmentId || DEPARTMENT_ID,
|
|
179
228
|
[],
|
|
180
229
|
query,
|
|
181
230
|
['project_id']
|