Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Google Tasks: Fix Show Completed [N8N-2898] #2741

Merged
merged 2 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class GoogleTasks implements INodeType {
//https://developers.google.com/tasks/v1/reference/tasks/list
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const taskListId = this.getNodeParameter('task', i) as string;
const options = this.getNodeParameter(
const { showCompleted = true, showDeleted = false, showHidden = false, ...options } = this.getNodeParameter(
'additionalFields',
i,
) as IDataObject;
Expand All @@ -187,15 +187,11 @@ export class GoogleTasks implements INodeType {
if (options.dueMax) {
qs.dueMax = options.dueMax as string;
}
if (options.showCompleted) {
qs.showCompleted = options.showCompleted as boolean;
}
if (options.showDeleted) {
qs.showDeleted = options.showDeleted as boolean;
}
if (options.showHidden) {
qs.showHidden = options.showHidden as boolean;
}

qs.showCompleted = showCompleted;
qs.showDeleted = showDeleted;
qs.showHidden = showHidden;

if (options.updatedMin) {
qs.updatedMin = options.updatedMin as string;
}
Expand Down
16 changes: 13 additions & 3 deletions packages/nodes-base/nodes/Google/Task/TaskDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ export const taskFields: INodeProperties[] = [
type: 'string',
default: '',
description: 'Title of the task.',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'task',
],
},
},
},
{
displayName: 'Additional Fields',
Expand Down Expand Up @@ -350,21 +360,21 @@ export const taskFields: INodeProperties[] = [
name: 'showCompleted',
type: 'boolean',
default: true,
description: 'Flag indicating whether completed tasks are returned in the result',
description: 'Flag indicating whether completed tasks are returned in the result. <strong>Show Hidden</strong> must also be True to show tasks completed in first party clients such as the web UI or Google\'s mobile apps.',
},
{
displayName: 'Show Deleted',
name: 'showDeleted',
type: 'boolean',
default: false,
description: 'Flag indicating whether deleted tasks are returned in the result',
description: 'Flag indicating whether deleted tasks are returned in the result.',
},
{
displayName: 'Show Hidden',
name: 'showHidden',
type: 'boolean',
default: false,
description: 'Flag indicating whether hidden tasks are returned in the result',
description: 'Flag indicating whether hidden tasks are returned in the result.',
},
{
displayName: 'Updated Min',
Expand Down