> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.teamwork.core.ChangeTaskDueDate

- Component: `appmixer.teamwork.core.ChangeTaskDueDate`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.teamwork 1.1.0](https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0/component/appmixer.teamwork.core.ChangeTaskDueDate>

Change the due date of a task in Teamwork.com

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Task ID (`taskId`) | number | - |
| Due Date (`dateOption`) | select | - |
| Date (`dueDate`) | date-time | - |
| Days after trigger date (`dateDays`) | number | - |
| Offset (`taskDateOffset`) | number | - |
| Unit (`taskDateOffsetUnit`) | select | - |
| Direction (`taskDateOffsetDirection`) | select | - |
| Skip weekends (`skipWeekends`) | toggle | - |

## Output ports

### Port `task`

| Field | Type | Description |
| --- | --- | --- |
| Id (`id`) | - | - |
| Due Date (`dueDate`) | - | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.teamwork.core.ChangeTaskDueDate",
  "auth": {
    "service": "appmixer:teamwork"
  },
  "author": "cian.woods@teamwork.com",
  "description": "Change the due date of a task in Teamwork.com",
  "private": false,
  "version": "1.0.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "integer"
          },
          "dateOption": {
            "type": "string"
          },
          "dueDate": {
            "type": "string"
          },
          "dateDays": {
            "type": "integer"
          },
          "taskDateOffset": {
            "type": "integer"
          },
          "taskDateOffsetUnit": {
            "type": "string"
          },
          "taskDateOffsetDirection": {
            "type": "string"
          },
          "skipWeekends": {
            "type": "boolean"
          }
        },
        "required": [
          "taskId",
          "dateOption"
        ]
      },
      "inspector": {
        "inputs": {
          "taskId": {
            "index": 0,
            "type": "number",
            "label": "Task ID"
          },
          "dateOption": {
            "index": 1,
            "type": "select",
            "label": "Due Date",
            "options": [
              {
                "content": "On trigger date",
                "value": "on-trigger-date"
              },
              {
                "content": "Choose date",
                "value": "choose-date"
              },
              {
                "content": "Days after trigger date",
                "value": "days-after-trigger-date"
              },
              {
                "content": "Start date - from the task",
                "value": "start-date-from-task"
              },
              {
                "content": "Due date - from the task",
                "value": "due-date-from-task"
              },
              {
                "content": "Remove date",
                "value": "remove-date"
              }
            ],
            "defaultValue": "choose-date"
          },
          "dueDate": {
            "when": {
              "eq": {
                "dateOption": "choose-date"
              }
            },
            "index": 2,
            "type": "date-time",
            "label": "Date",
            "config": {
              "format": "YYYY-MM-DD"
            }
          },
          "dateDays": {
            "when": {
              "eq": {
                "dateOption": "days-after-trigger-date"
              }
            },
            "index": 3,
            "type": "number",
            "label": "Days after trigger date",
            "min": 0,
            "defaultValue": 1
          },
          "taskDateOffset": {
            "when": {
              "in": {
                "dateOption": [
                  "start-date-from-task",
                  "due-date-from-task"
                ]
              }
            },
            "index": 4,
            "type": "number",
            "label": "Offset",
            "min": 0,
            "defaultValue": 1
          },
          "taskDateOffsetUnit": {
            "when": {
              "in": {
                "dateOption": [
                  "start-date-from-task",
                  "due-date-from-task"
                ]
              }
            },
            "index": 5,
            "type": "select",
            "label": "Unit",
            "options": [
              {
                "content": "Day",
                "value": "day"
              },
              {
                "content": "Week",
                "value": "week"
              }
            ],
            "defaultValue": "day"
          },
          "taskDateOffsetDirection": {
            "when": {
              "in": {
                "dateOption": [
                  "start-date-from-task",
                  "due-date-from-task"
                ]
              }
            },
            "index": 6,
            "type": "select",
            "label": "Direction",
            "options": [
              {
                "content": "Before",
                "value": "before"
              },
              {
                "content": "After",
                "value": "after"
              }
            ],
            "defaultValue": "after"
          },
          "skipWeekends": {
            "when": {
              "in": {
                "dateOption": [
                  "days-after-trigger-date",
                  "start-date-from-task",
                  "due-date-from-task"
                ]
              }
            },
            "index": 7,
            "type": "toggle",
            "label": "Skip weekends",
            "defaultValue": false
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "task",
      "options": [
        {
          "label": "Id",
          "value": "id"
        },
        {
          "label": "Due Date",
          "value": "dueDate"
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
