@blickwerk/n8n-nodes-microsoft-planner 1.3.1 → 1.3.3
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.
|
@@ -127,7 +127,6 @@ class MicrosoftPlanner {
|
|
|
127
127
|
if (operation === 'create') {
|
|
128
128
|
const planId = this.getNodeParameter('planId', i);
|
|
129
129
|
const bucketIdParam = this.getNodeParameter('bucketId', i);
|
|
130
|
-
// Extract bucketId value from resourceLocator object or string
|
|
131
130
|
const bucketId = typeof bucketIdParam === 'string'
|
|
132
131
|
? bucketIdParam
|
|
133
132
|
: bucketIdParam.value;
|
|
@@ -205,13 +204,18 @@ class MicrosoftPlanner {
|
|
|
205
204
|
// ----------------------------------
|
|
206
205
|
if (operation === 'getAll') {
|
|
207
206
|
const returnAll = this.getNodeParameter('returnAll', i);
|
|
208
|
-
const
|
|
207
|
+
const filterBy = this.getNodeParameter('filterBy', i);
|
|
208
|
+
const planId = this.getNodeParameter('planId', i);
|
|
209
209
|
let endpoint = '';
|
|
210
|
-
if (
|
|
211
|
-
endpoint = `/planner/plans/${
|
|
210
|
+
if (filterBy === 'plan') {
|
|
211
|
+
endpoint = `/planner/plans/${planId}/tasks`;
|
|
212
212
|
}
|
|
213
|
-
else if (
|
|
214
|
-
|
|
213
|
+
else if (filterBy === 'bucket') {
|
|
214
|
+
const bucketIdParam = this.getNodeParameter('bucketId', i);
|
|
215
|
+
const bucketIdValue = typeof bucketIdParam === 'string'
|
|
216
|
+
? bucketIdParam
|
|
217
|
+
: bucketIdParam.value;
|
|
218
|
+
endpoint = `/planner/buckets/${bucketIdValue}/tasks`;
|
|
215
219
|
}
|
|
216
220
|
else {
|
|
217
221
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'You must specify either a Plan ID or Bucket ID to retrieve tasks', { itemIndex: i });
|
|
@@ -197,7 +197,7 @@ exports.taskFields = [
|
|
|
197
197
|
displayName: 'Task',
|
|
198
198
|
name: 'taskId',
|
|
199
199
|
type: 'resourceLocator',
|
|
200
|
-
default: { mode: '
|
|
200
|
+
default: { mode: 'id', value: '' },
|
|
201
201
|
required: true,
|
|
202
202
|
displayOptions: {
|
|
203
203
|
show: {
|
|
@@ -206,15 +206,6 @@ exports.taskFields = [
|
|
|
206
206
|
},
|
|
207
207
|
},
|
|
208
208
|
modes: [
|
|
209
|
-
{
|
|
210
|
-
displayName: 'From List',
|
|
211
|
-
name: 'list',
|
|
212
|
-
type: 'list',
|
|
213
|
-
typeOptions: {
|
|
214
|
-
searchListMethod: 'getTasks',
|
|
215
|
-
searchable: true,
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
209
|
{
|
|
219
210
|
displayName: 'By ID',
|
|
220
211
|
name: 'id',
|
|
@@ -281,11 +272,9 @@ exports.taskFields = [
|
|
|
281
272
|
description: 'Max number of results to return',
|
|
282
273
|
},
|
|
283
274
|
{
|
|
284
|
-
displayName: '
|
|
285
|
-
name: '
|
|
286
|
-
type: '
|
|
287
|
-
placeholder: 'Add Filter',
|
|
288
|
-
default: {},
|
|
275
|
+
displayName: 'Filter By',
|
|
276
|
+
name: 'filterBy',
|
|
277
|
+
type: 'options',
|
|
289
278
|
displayOptions: {
|
|
290
279
|
show: {
|
|
291
280
|
resource: ['task'],
|
|
@@ -294,36 +283,62 @@ exports.taskFields = [
|
|
|
294
283
|
},
|
|
295
284
|
options: [
|
|
296
285
|
{
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
type: 'string',
|
|
300
|
-
default: '',
|
|
301
|
-
description: 'Filter tasks by Plan ID',
|
|
302
|
-
placeholder: 'Enter Plan ID',
|
|
286
|
+
name: 'Plan',
|
|
287
|
+
value: 'plan',
|
|
303
288
|
},
|
|
304
289
|
{
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
290
|
+
name: 'Bucket',
|
|
291
|
+
value: 'bucket',
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
default: 'plan',
|
|
295
|
+
description: 'Choose whether to filter by Plan or Bucket',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
displayName: 'Plan ID',
|
|
299
|
+
name: 'planId',
|
|
300
|
+
type: 'string',
|
|
301
|
+
displayOptions: {
|
|
302
|
+
show: {
|
|
303
|
+
resource: ['task'],
|
|
304
|
+
operation: ['getAll'],
|
|
305
|
+
filterBy: ['plan', 'bucket'],
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
default: '',
|
|
309
|
+
required: true,
|
|
310
|
+
description: 'The Plan ID to filter tasks',
|
|
311
|
+
placeholder: 'Enter Plan ID',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
displayName: 'Bucket',
|
|
315
|
+
name: 'bucketId',
|
|
316
|
+
type: 'resourceLocator',
|
|
317
|
+
displayOptions: {
|
|
318
|
+
show: {
|
|
319
|
+
resource: ['task'],
|
|
320
|
+
operation: ['getAll'],
|
|
321
|
+
filterBy: ['bucket'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
default: { mode: 'list', value: '' },
|
|
325
|
+
required: true,
|
|
326
|
+
description: 'The Bucket to filter tasks',
|
|
327
|
+
modes: [
|
|
328
|
+
{
|
|
329
|
+
displayName: 'From List',
|
|
330
|
+
name: 'list',
|
|
331
|
+
type: 'list',
|
|
332
|
+
typeOptions: {
|
|
333
|
+
searchListMethod: 'getBuckets',
|
|
334
|
+
searchable: true,
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
displayName: 'By ID',
|
|
339
|
+
name: 'id',
|
|
340
|
+
type: 'string',
|
|
341
|
+
placeholder: 'e.g. FTmIDbes6UyAjh1k0suR3JgACHty',
|
|
327
342
|
},
|
|
328
343
|
],
|
|
329
344
|
},
|