@blickwerk/n8n-nodes-microsoft-planner 1.3.0 → 1.3.2
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.
|
@@ -47,7 +47,21 @@ class MicrosoftPlanner {
|
|
|
47
47
|
listSearch: {
|
|
48
48
|
async getBuckets() {
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
// Try to get planId from main parameter or from filters collection
|
|
51
|
+
let planId = '';
|
|
52
|
+
try {
|
|
53
|
+
planId = this.getNodeParameter('planId', 0);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
// If not found in main parameters, try filters
|
|
57
|
+
try {
|
|
58
|
+
const filters = this.getNodeParameter('filters', 0);
|
|
59
|
+
planId = filters.planId;
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
// planId not found anywhere
|
|
63
|
+
}
|
|
64
|
+
}
|
|
51
65
|
if (!planId) {
|
|
52
66
|
return { results: [] };
|
|
53
67
|
}
|
|
@@ -211,7 +225,10 @@ class MicrosoftPlanner {
|
|
|
211
225
|
endpoint = `/planner/plans/${filters.planId}/tasks`;
|
|
212
226
|
}
|
|
213
227
|
else if (filters.bucketId) {
|
|
214
|
-
|
|
228
|
+
const bucketIdValue = typeof filters.bucketId === 'string'
|
|
229
|
+
? filters.bucketId
|
|
230
|
+
: filters.bucketId.value;
|
|
231
|
+
endpoint = `/planner/buckets/${bucketIdValue}/tasks`;
|
|
215
232
|
}
|
|
216
233
|
else {
|
|
217
234
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'You must specify either a Plan ID or Bucket ID to retrieve tasks', { itemIndex: i });
|
|
@@ -304,12 +304,26 @@ exports.taskFields = [
|
|
|
304
304
|
{
|
|
305
305
|
displayName: 'Bucket',
|
|
306
306
|
name: 'bucketId',
|
|
307
|
-
type: '
|
|
308
|
-
|
|
309
|
-
loadOptionsMethod: 'getBuckets',
|
|
310
|
-
},
|
|
311
|
-
default: '',
|
|
307
|
+
type: 'resourceLocator',
|
|
308
|
+
default: { mode: 'list', value: '' },
|
|
312
309
|
description: 'Filter tasks by bucket',
|
|
310
|
+
modes: [
|
|
311
|
+
{
|
|
312
|
+
displayName: 'From List',
|
|
313
|
+
name: 'list',
|
|
314
|
+
type: 'list',
|
|
315
|
+
typeOptions: {
|
|
316
|
+
searchListMethod: 'getBuckets',
|
|
317
|
+
searchable: true,
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
displayName: 'By ID',
|
|
322
|
+
name: 'id',
|
|
323
|
+
type: 'string',
|
|
324
|
+
placeholder: 'e.g. FTmIDbes6UyAjh1k0suR3JgACHty',
|
|
325
|
+
},
|
|
326
|
+
],
|
|
313
327
|
},
|
|
314
328
|
],
|
|
315
329
|
},
|