@blickwerk/n8n-nodes-microsoft-planner 1.3.1 → 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
- const planId = this.getNodeParameter('planId', 0);
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
- endpoint = `/planner/buckets/${filters.bucketId}/tasks`;
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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blickwerk/n8n-nodes-microsoft-planner",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "n8n node for Microsoft Planner - Create and retrieve tasks",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",