@blickwerk/n8n-nodes-microsoft-planner 1.2.0 → 1.2.1

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
@@ -167,6 +167,13 @@ Tested with n8n version 1.0.0 and above.
167
167
 
168
168
  ## Version History
169
169
 
170
+ ### 1.2.1
171
+ - Fixed Plans not loading (improved API endpoint to fetch from groups)
172
+ - Allow manual ID input in all dropdown fields
173
+ - You can now choose from dropdown OR paste IDs manually
174
+ - Added placeholders and better descriptions for all ID fields
175
+ - Improved error handling for plans loading
176
+
170
177
  ### 1.2.0
171
178
  - **Major UX Improvement**: Added dynamic dropdowns for Plans, Buckets, and Tasks
172
179
  - No more manual ID lookup - select from dropdown menus
@@ -3,7 +3,10 @@ export declare class MicrosoftPlanner implements INodeType {
3
3
  description: INodeTypeDescription;
4
4
  methods: {
5
5
  loadOptions: {
6
- getPlans(this: ILoadOptionsFunctions): Promise<any>;
6
+ getPlans(this: ILoadOptionsFunctions): Promise<{
7
+ name: any;
8
+ value: any;
9
+ }[]>;
7
10
  getBuckets(this: ILoadOptionsFunctions): Promise<any>;
8
11
  getTasks(this: ILoadOptionsFunctions): Promise<any>;
9
12
  };
@@ -46,11 +46,31 @@ class MicrosoftPlanner {
46
46
  this.methods = {
47
47
  loadOptions: {
48
48
  async getPlans() {
49
- const plans = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/me/planner/plans');
50
- return plans.map((plan) => ({
51
- name: plan.title,
52
- value: plan.id,
53
- }));
49
+ try {
50
+ // Try to get plans from groups the user is member of
51
+ const groups = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/me/memberOf/microsoft.graph.group?$filter=groupTypes/any(c:c+eq+%27Unified%27)');
52
+ const plans = [];
53
+ for (const group of groups) {
54
+ try {
55
+ const groupPlans = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/groups/${group.id}/planner/plans`);
56
+ if (groupPlans.value && groupPlans.value.length > 0) {
57
+ plans.push(...groupPlans.value);
58
+ }
59
+ }
60
+ catch (error) {
61
+ // Skip groups without plans
62
+ continue;
63
+ }
64
+ }
65
+ return plans.map((plan) => ({
66
+ name: plan.title || plan.id,
67
+ value: plan.id,
68
+ }));
69
+ }
70
+ catch (error) {
71
+ console.error('Error loading plans:', error);
72
+ return [];
73
+ }
54
74
  },
55
75
  async getBuckets() {
56
76
  const planId = this.getNodeParameter('planId', 0);
@@ -54,7 +54,7 @@ exports.taskFields = [
54
54
  {
55
55
  displayName: 'Plan',
56
56
  name: 'planId',
57
- type: 'options',
57
+ type: 'string',
58
58
  typeOptions: {
59
59
  loadOptionsMethod: 'getPlans',
60
60
  },
@@ -66,12 +66,13 @@ exports.taskFields = [
66
66
  },
67
67
  },
68
68
  default: '',
69
- description: 'The plan to which the task belongs',
69
+ description: 'The plan to which the task belongs. Choose from the dropdown or enter a Plan ID manually.',
70
+ placeholder: 'Select from dropdown or paste Plan ID',
70
71
  },
71
72
  {
72
73
  displayName: 'Bucket',
73
74
  name: 'bucketId',
74
- type: 'options',
75
+ type: 'string',
75
76
  typeOptions: {
76
77
  loadOptionsMethod: 'getBuckets',
77
78
  },
@@ -83,7 +84,8 @@ exports.taskFields = [
83
84
  },
84
85
  },
85
86
  default: '',
86
- description: 'The bucket to which the task belongs',
87
+ description: 'The bucket to which the task belongs. Choose from the dropdown or enter a Bucket ID manually.',
88
+ placeholder: 'Select from dropdown or paste Bucket ID',
87
89
  },
88
90
  {
89
91
  displayName: 'Title',
@@ -184,7 +186,7 @@ exports.taskFields = [
184
186
  {
185
187
  displayName: 'Task',
186
188
  name: 'taskId',
187
- type: 'options',
189
+ type: 'string',
188
190
  typeOptions: {
189
191
  loadOptionsMethod: 'getTasks',
190
192
  },
@@ -196,7 +198,8 @@ exports.taskFields = [
196
198
  },
197
199
  },
198
200
  default: '',
199
- description: 'The task to operate on',
201
+ description: 'The task to operate on. Choose from the dropdown or enter a Task ID manually.',
202
+ placeholder: 'Select from dropdown or paste Task ID',
200
203
  },
201
204
  {
202
205
  displayName: 'Additional Fields',
@@ -270,22 +273,24 @@ exports.taskFields = [
270
273
  {
271
274
  displayName: 'Plan',
272
275
  name: 'planId',
273
- type: 'options',
276
+ type: 'string',
274
277
  typeOptions: {
275
278
  loadOptionsMethod: 'getPlans',
276
279
  },
277
280
  default: '',
278
- description: 'Filter tasks by plan',
281
+ description: 'Filter tasks by plan. Choose from the dropdown or enter a Plan ID manually.',
282
+ placeholder: 'Select from dropdown or paste Plan ID',
279
283
  },
280
284
  {
281
285
  displayName: 'Bucket',
282
286
  name: 'bucketId',
283
- type: 'options',
287
+ type: 'string',
284
288
  typeOptions: {
285
289
  loadOptionsMethod: 'getBuckets',
286
290
  },
287
291
  default: '',
288
- description: 'Filter tasks by bucket',
292
+ description: 'Filter tasks by bucket. Choose from the dropdown or enter a Bucket ID manually.',
293
+ placeholder: 'Select from dropdown or paste Bucket ID',
289
294
  },
290
295
  ],
291
296
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blickwerk/n8n-nodes-microsoft-planner",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "n8n node for Microsoft Planner - Create and retrieve tasks",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",