# Comment on a Jira issue

> Adds a comment to an issue. A step run again does not comment twice.

Source: https://docs.go-lumen.ai/reference/steps/jira-add-comment

## At a glance

| Property | Value |
| --- | --- |
| **Step name** | `jira-add-comment` |
| **Resource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palette group, category** | notify, jira |
| **Credits** | **0.5** credits each time it succeeds |
| **Side effects** | yes: It changes something outside Lumen, so a retry asks first and a test shows what it would do instead of doing it. |
| **Installation must provide** | nothing |

## Inputs

| Property | Value |
| --- | --- |
| **Needs** | nothing |
| **Produces** | `fields` |
| **Works on** | item: one document at a time |

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See [Documents and data](https://docs.go-lumen.ai/concepts/how-flows-run.md#documents-and-data).

## Outputs

A later node references an output as `{nodeId.field}` in text, or `nodeId.field` in a condition.

| Output | Type |
| --- | --- |
| `key` | string |
| `commentId` | string |
| `commentUrl` | string |

## Settings

Set under `config:` on the flow node. Text settings may contain `{nodeId.field}` placeholders.

| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `connectorRef` | string |  | Jira connection (minLength 1) |
| `issue` | string |  | An issue key such as PROJ-123, or a value from earlier in the flow. Empty is the issue the flow started from. (maxLength 200) |
| `body` (required) | string |  | Plain text; \*\*bold\*\*, lists and links work. (minLength 1; maxLength 32000) |

The full JSON Schema of these settings: [jira-add-comment.schema.json](https://docs.go-lumen.ai/schemas/steps/jira-add-comment.schema.json).

## Example

Note the payment on the ticket

```yaml title="config"
body: Paid {amount} on {paidAt}.
```

## Use it in a flow

A node that runs `jira-add-comment` goes under `spec.nodes` of a [Flow](https://docs.go-lumen.ai/concepts/how-flows-run.md#the-flow-as-yaml). Give it any id, and list the next node ids in next.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: jira-add-comment-example
  namespace: tenant-acme
spec:
  displayName: "Comment on a Jira issue"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [jira-add-comment]
  nodes:
    - id: jira-add-comment
      stepRef: {name: jira-add-comment}
      config:
        body: Paid {amount} on {paidAt}.
```
