@blickwerk/n8n-nodes-microsoft-planner 1.2.2 → 1.2.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/README.md
CHANGED
|
@@ -181,6 +181,17 @@ Tested with n8n version 1.0.0 and above.
|
|
|
181
181
|
|
|
182
182
|
## Version History
|
|
183
183
|
|
|
184
|
+
### 1.2.4
|
|
185
|
+
- **Fixed Bucket and Task dropdowns not showing!**
|
|
186
|
+
- Changed field type from 'string' back to 'options' for proper dropdown display
|
|
187
|
+
- Buckets now load correctly when Plan ID is entered
|
|
188
|
+
- Tasks dropdown now works properly
|
|
189
|
+
|
|
190
|
+
### 1.2.3
|
|
191
|
+
- Improved error handling for Buckets and Tasks loading
|
|
192
|
+
- Better fallback values when data cannot be loaded
|
|
193
|
+
- Added console logging for debugging dropdown issues
|
|
194
|
+
|
|
184
195
|
### 1.2.2
|
|
185
196
|
- Removed Plan dropdown (Plans cannot be loaded via API)
|
|
186
197
|
- Plan ID is now manual input only
|
|
@@ -46,34 +46,52 @@ class MicrosoftPlanner {
|
|
|
46
46
|
this.methods = {
|
|
47
47
|
loadOptions: {
|
|
48
48
|
async getBuckets() {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
try {
|
|
50
|
+
const planId = this.getNodeParameter('planId', 0);
|
|
51
|
+
if (!planId) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
const buckets = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', `/planner/plans/${planId}/buckets`);
|
|
55
|
+
if (!buckets || buckets.length === 0) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
return buckets.map((bucket) => ({
|
|
59
|
+
name: bucket.name || bucket.id,
|
|
60
|
+
value: bucket.id,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error('Error loading buckets:', error);
|
|
51
65
|
return [];
|
|
52
66
|
}
|
|
53
|
-
const buckets = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', `/planner/plans/${planId}/buckets`);
|
|
54
|
-
return buckets.map((bucket) => ({
|
|
55
|
-
name: bucket.name,
|
|
56
|
-
value: bucket.id,
|
|
57
|
-
}));
|
|
58
67
|
},
|
|
59
68
|
async getTasks() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
try {
|
|
70
|
+
const planId = this.getNodeParameter('planId', 0);
|
|
71
|
+
const bucketId = this.getNodeParameter('bucketId', 0);
|
|
72
|
+
let endpoint = '';
|
|
73
|
+
if (bucketId) {
|
|
74
|
+
endpoint = `/planner/buckets/${bucketId}/tasks`;
|
|
75
|
+
}
|
|
76
|
+
else if (planId) {
|
|
77
|
+
endpoint = `/planner/plans/${planId}/tasks`;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
const tasks = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint);
|
|
83
|
+
if (!tasks || tasks.length === 0) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
return tasks.map((task) => ({
|
|
87
|
+
name: task.title || task.id,
|
|
88
|
+
value: task.id,
|
|
89
|
+
}));
|
|
68
90
|
}
|
|
69
|
-
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.error('Error loading tasks:', error);
|
|
70
93
|
return [];
|
|
71
94
|
}
|
|
72
|
-
const tasks = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint);
|
|
73
|
-
return tasks.map((task) => ({
|
|
74
|
-
name: task.title,
|
|
75
|
-
value: task.id,
|
|
76
|
-
}));
|
|
77
95
|
},
|
|
78
96
|
},
|
|
79
97
|
};
|
|
@@ -69,7 +69,7 @@ exports.taskFields = [
|
|
|
69
69
|
{
|
|
70
70
|
displayName: 'Bucket',
|
|
71
71
|
name: 'bucketId',
|
|
72
|
-
type: '
|
|
72
|
+
type: 'options',
|
|
73
73
|
typeOptions: {
|
|
74
74
|
loadOptionsMethod: 'getBuckets',
|
|
75
75
|
},
|
|
@@ -81,8 +81,7 @@ exports.taskFields = [
|
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
default: '',
|
|
84
|
-
description: 'The bucket to which the task belongs
|
|
85
|
-
placeholder: 'Select from dropdown or paste Bucket ID',
|
|
84
|
+
description: 'The bucket to which the task belongs',
|
|
86
85
|
},
|
|
87
86
|
{
|
|
88
87
|
displayName: 'Title',
|
|
@@ -183,7 +182,7 @@ exports.taskFields = [
|
|
|
183
182
|
{
|
|
184
183
|
displayName: 'Task',
|
|
185
184
|
name: 'taskId',
|
|
186
|
-
type: '
|
|
185
|
+
type: 'options',
|
|
187
186
|
typeOptions: {
|
|
188
187
|
loadOptionsMethod: 'getTasks',
|
|
189
188
|
},
|
|
@@ -195,8 +194,7 @@ exports.taskFields = [
|
|
|
195
194
|
},
|
|
196
195
|
},
|
|
197
196
|
default: '',
|
|
198
|
-
description: 'The task to operate on
|
|
199
|
-
placeholder: 'Select from dropdown or paste Task ID',
|
|
197
|
+
description: 'The task to operate on',
|
|
200
198
|
},
|
|
201
199
|
{
|
|
202
200
|
displayName: 'Additional Fields',
|
|
@@ -278,13 +276,12 @@ exports.taskFields = [
|
|
|
278
276
|
{
|
|
279
277
|
displayName: 'Bucket',
|
|
280
278
|
name: 'bucketId',
|
|
281
|
-
type: '
|
|
279
|
+
type: 'options',
|
|
282
280
|
typeOptions: {
|
|
283
281
|
loadOptionsMethod: 'getBuckets',
|
|
284
282
|
},
|
|
285
283
|
default: '',
|
|
286
|
-
description: 'Filter tasks by bucket
|
|
287
|
-
placeholder: 'Select from dropdown or paste Bucket ID',
|
|
284
|
+
description: 'Filter tasks by bucket',
|
|
288
285
|
},
|
|
289
286
|
],
|
|
290
287
|
},
|