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

# Update Project Item Field

- Component: `appmixer.github.project.UpdateProjectItemField`
- Kind: Action
- Version: 1.1.0
- Visibility: Public
- Connector: [appmixer.github 4.2.0](https://connectors.appmixer.com/connector/appmixer.github/4.2.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.github/4.2.0/component/appmixer.github.project.UpdateProjectItemField>

Set a single-select, number, text, date or iteration field on a Projects (v2) card. Single-select values are given by option name and resolved to the option ID.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Project ID (`projectId`) | text | The node ID of the project the card belongs to, for example 'PVT_kwDOAA12oc4AGXUu'. |
| Item ID (`itemId`) | text | The node ID of the project item (card) to update, for example 'PVTI_lADOAA12oc4AGXUuzgbi8fA'. Leave empty and set Content ID to work with an issue or pull request instead. |
| Content ID (`contentId`) | text | Used when Item ID is empty: the node ID of an issue or pull request, for example 'I_kwDOAA12oc6abcde'. It is added to the project if it is not there yet (an existing card is reused), then its field is set. |
| Field ID (`fieldId`) | text | The node ID of the field to set. Pick one of the project's fields or type the ID manually. |
| Value Type (`valueType`) | select | The data type of the field being written. This decides how the value is interpreted. |
| Value (`value`) | text | The value to write. For single select and iteration fields give the option name (for example 'In Progress'); an option ID is accepted too. Dates accept any parseable date and are truncated to YYYY-MM-DD. |

## Output ports

### Port `out`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.github.project.UpdateProjectItemField",
  "label": "Update Project Item Field",
  "description": "Set a single-select, number, text, date or iteration field on a Projects (v2) card. Single-select values are given by option name and resolved to the option ID.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.1.0",
  "auth": {
    "service": "appmixer:github",
    "scope": [
      "project",
      "repo"
    ]
  },
  "quota": {
    "manager": "appmixer:github",
    "resources": "requests-projects",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "itemId": {
            "type": "string"
          },
          "contentId": {
            "type": "string"
          },
          "fieldId": {
            "type": "string"
          },
          "valueType": {
            "type": "string",
            "enum": [
              "single_select",
              "text",
              "number",
              "date",
              "iteration"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "fieldId",
          "value"
        ]
      },
      "inspector": {
        "inputs": {
          "projectId": {
            "type": "text",
            "tooltip": "The node ID of the project the card belongs to, for example 'PVT_kwDOAA12oc4AGXUu'.",
            "label": "Project ID",
            "index": 1
          },
          "itemId": {
            "type": "text",
            "tooltip": "The node ID of the project item (card) to update, for example 'PVTI_lADOAA12oc4AGXUuzgbi8fA'. Leave empty and set Content ID to work with an issue or pull request instead.",
            "label": "Item ID",
            "index": 2
          },
          "contentId": {
            "type": "text",
            "tooltip": "Used when Item ID is empty: the node ID of an issue or pull request, for example 'I_kwDOAA12oc6abcde'. It is added to the project if it is not there yet (an existing card is reused), then its field is set.",
            "label": "Content ID",
            "index": 3
          },
          "fieldId": {
            "type": "text",
            "tooltip": "The node ID of the field to set. Pick one of the project's fields or type the ID manually.",
            "label": "Field ID",
            "index": 4,
            "source": {
              "url": "/component/appmixer/github/project/GetProjectFields?outPort=out",
              "data": {
                "messages": {
                  "in/projectId": "inputs/in/projectId",
                  "in/outputType": "array"
                },
                "transform": "./transformers#fieldsToSelectArray"
              }
            }
          },
          "valueType": {
            "type": "select",
            "tooltip": "The data type of the field being written. This decides how the value is interpreted.",
            "label": "Value Type",
            "index": 5,
            "defaultValue": "single_select",
            "options": [
              {
                "label": "Single Select",
                "value": "single_select"
              },
              {
                "label": "Text",
                "value": "text"
              },
              {
                "label": "Number",
                "value": "number"
              },
              {
                "label": "Date",
                "value": "date"
              },
              {
                "label": "Iteration",
                "value": "iteration"
              }
            ]
          },
          "value": {
            "type": "text",
            "tooltip": "The value to write. For single select and iteration fields give the option name (for example 'In Progress'); an option ID is accepted too. Dates accept any parseable date and are truncated to YYYY-MM-DD.",
            "label": "Value",
            "index": 6
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out"
    }
  ],
  "icon": "(data URI omitted)"
}
```
