Improvements to ClickUp-Node (#921)

This commit is contained in:
Ricardo Espinoza
2020-09-06 15:38:18 -04:00
committed by GitHub
parent d64c767ebd
commit f24afcd86f
3 changed files with 297 additions and 8 deletions

View File

@@ -31,12 +31,17 @@ export const taskOperations = [
description: 'Get a task',
},
{
name: 'Get all',
name: 'Get All',
value: 'getAll',
description: 'Get all tasks',
},
{
name: 'Set custom field',
name: 'Member',
value: 'member',
description: 'Get task members',
},
{
name: 'Set Custom Field',
value: 'setCustomField',
description: 'Set a custom field',
},
@@ -95,7 +100,7 @@ export const taskFields = [
loadOptionsMethod: 'getSpaces',
loadOptionsDependsOn: [
'team',
]
],
},
required: true,
},
@@ -190,7 +195,7 @@ export const taskFields = [
loadOptionsMethod: 'getLists',
loadOptionsDependsOn: [
'folder',
]
],
},
required: true,
},
@@ -239,7 +244,6 @@ export const taskFields = [
typeOptions: {
loadOptionsMethod: 'getAssignees',
},
default: [],
},
{
@@ -302,6 +306,12 @@ export const taskFields = [
description: 'Integer mapping as 1 : Urgent, 2 : High, 3 : Normal, 4 : Low',
default: 3,
},
{
displayName: 'Start Date',
name: 'startDate',
type: 'dateTime',
default: '',
},
{
displayName: 'Start Date Time',
name: 'startDateTime',
@@ -457,6 +467,12 @@ export const taskFields = [
default: '',
description: 'status'
},
{
displayName: 'Start Date',
name: 'startDate',
type: 'dateTime',
default: '',
},
{
displayName: 'Start Date Time',
name: 'startDateTime',
@@ -631,7 +647,7 @@ export const taskFields = [
loadOptionsMethod: 'getLists',
loadOptionsDependsOn: [
'folder',
]
],
},
required: true,
},
@@ -712,6 +728,91 @@ export const taskFields = [
default: [],
},
{
displayName: 'Custom Fields',
name: 'customFieldsUi',
placeholder: 'Add Custom Field',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
description: 'Filter by custom fields ',
default: {},
options: [
{
name: 'customFieldsValues',
displayName: 'Custom Field',
values: [
{
displayName: 'Field ID',
name: 'fieldId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCustomFields',
},
default: '',
description: 'The ID of the field to add custom field to.',
},
{
displayName: 'Operator',
name: 'operator',
type: 'options',
options: [
{
name: 'Equal',
value: 'equal',
},
{
name: '<',
value: '<',
},
{
name: '<=',
value: '<=',
},
{
name: '>',
value: '>',
},
{
name: '>=',
value: '>=',
},
{
name: '!=',
value: '!=',
},
{
name: 'Is Null',
value: 'IS NULL',
},
{
name: 'Is Not Null',
value: 'IS NOT NULL',
},
],
default: 'equal',
description: 'The value to set on custom field.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
displayOptions: {
hide: {
operator: [
'IS NULL',
'IS NOT NULL',
],
},
},
default: '',
description: 'The value to set on custom field.',
},
],
},
],
},
{
displayName: 'Date Created Greater Than',
name: 'dateCreatedGt',
@@ -841,6 +942,68 @@ export const taskFields = [
description: 'task ID',
},
/* -------------------------------------------------------------------------- */
/* task:member */
/* -------------------------------------------------------------------------- */
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'member',
],
},
},
description: 'Task ID',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'member',
],
},
},
default: true,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'member',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 100,
},
default: 50,
description: 'How many results to return.',
},
/* -------------------------------------------------------------------------- */
/* task:setCustomField */
/* -------------------------------------------------------------------------- */
{