> 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.ChangeTaskAssignees

- Component: `appmixer.teamwork.core.ChangeTaskAssignees`
- 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.ChangeTaskAssignees>

Change the assignees of a task in Teamwork.com

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Task ID (`taskId`) | number | - |
| Operation (`operation`) | select | - |
| Selected Type (`selectedType`) | select | - |
| Users (`userIds`) | multiselect | - |
| Teams (`teamIds`) | multiselect | - |
| Companies (`companyIds`) | multiselect | - |

## Output ports

### Port `assignees`

| Field | Type | Description |
| --- | --- | --- |
| Task ID (`taskId`) | - | - |
| Assignees (`assignees`) | - | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.teamwork.core.ChangeTaskAssignees",
  "auth": {
    "service": "appmixer:teamwork"
  },
  "author": "sinead.cullinane@teamwork.com",
  "description": "Change the assignees of a task in Teamwork.com",
  "private": false,
  "version": "1.0.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "integer"
          },
          "operation": {
            "type": "string",
            "enum": [
              "add",
              "remove",
              "reassign",
              "removeAllAssignees"
            ]
          },
          "selectedType": {
            "type": "string",
            "enum": [
              "selected",
              "project-owner",
              "task-creator"
            ]
          },
          "userIds": {
            "type": "array"
          },
          "teamIds": {
            "type": "array"
          },
          "companyIds": {
            "type": "array"
          }
        },
        "required": [
          "taskId",
          "operation"
        ]
      },
      "inspector": {
        "inputs": {
          "taskId": {
            "index": 0,
            "type": "number",
            "label": "Task ID"
          },
          "operation": {
            "index": 1,
            "type": "select",
            "label": "Operation",
            "options": [
              {
                "content": "Add",
                "value": "add"
              },
              {
                "content": "Remove",
                "value": "remove"
              },
              {
                "content": "Reassign",
                "value": "reassign"
              },
              {
                "content": "Remove All Assignees",
                "value": "removeAllAssignees"
              }
            ],
            "defaultValue": "add"
          },
          "selectedType": {
            "when": {
              "in": {
                "operation": [
                  "add",
                  "reassign",
                  "remove"
                ]
              }
            },
            "index": 2,
            "type": "select",
            "label": "Selected Type",
            "options": [
              {
                "content": "Select People",
                "value": "selected"
              },
              {
                "content": "Task Creator",
                "value": "task-creator"
              }
            ],
            "defaultValue": "selected"
          },
          "userIds": {
            "when": {
              "eq": {
                "selectedType": "selected"
              }
            },
            "index": 3,
            "type": "multiselect",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListPeople?outPort=people",
              "data": {
                "transform": "ListPeople#toInspector"
              }
            },
            "label": "Users"
          },
          "teamIds": {
            "when": {
              "eq": {
                "selectedType": "selected"
              }
            },
            "index": 4,
            "type": "multiselect",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListTeams?outPort=teams",
              "data": {
                "transform": "ListTeams#toInspector"
              }
            },
            "label": "Teams"
          },
          "companyIds": {
            "when": {
              "eq": {
                "selectedType": "selected"
              }
            },
            "index": 5,
            "type": "multiselect",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListCompanies?outPort=companies",
              "data": {
                "transform": "ListCompanies#toInspector"
              }
            },
            "label": "Companies"
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "assignees",
      "options": [
        {
          "label": "Task ID",
          "value": "taskId"
        },
        {
          "label": "Assignees",
          "value": "assignees"
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
