> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1/approvals/jira-approval.md).

# Jira approval step

Pause pipeline execution and wait for a Jira issue to reach a specific state before continuing.

The **Jira approval** step pauses a pipeline and polls a Jira issue at a configurable interval. When the issue fields match your approval criteria, the pipeline resumes. If they match your reject criteria, the pipeline fails. If polling continues past the step timeout without a match, the step expires.

***

## What you will learn from this topic

* How to add a Jira approval step to a pipeline
* How to configure the Jira connector, issue key, and polling interval
* How to define approval and reject criteria using field conditions or a JEXL expression
* The complete YAML reference for `jiraApproval`

***

## Before you begin

* **Jira connector:** You need a Jira connector configured in Harness. Go to [Connect to Jira](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/connectors/ticketing-systems/connect-to-jira.md) to create one.

***

## Add the step

In Pipeline Studio, click **+** to add a step inside a stage, then search for **approval** in the step library. Select **Jira Approval**.

***

## YAML

```yaml
pipeline:
  id: my-pipeline
  name: My Pipeline
  clone:
    enabled: true
    repo: my-repo
    depth: 1
  stages:
    - name: my-stage
      id: my_stage
      steps:
        - name: my-step
          id: my_step
          deploy:
            uses: jiraApproval
            with:
              connector: account.my-jira-connector
              issue: PROJ-1234
              retry: 1m
              approve:
                match-any-condition: true
                conditions:
                  - status:
                      eq: "Done"
              log_level: error
```

***

## Configure the step

### Required fields

The following fields are required to configure the step.

| Field                | Description                                                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**             | Display name for the step in the execution view.                                                                                          |
| **Jira Connector**   | The Jira connector that authenticates to your Jira instance.                                                                              |
| **Issue Key**        | The Jira issue key to poll (for example, `PROJ-1234`). Supports runtime input `<+input>` and expressions.                                 |
| **Approve Criteria** | Conditions that must be met for the pipeline to proceed. Go to [Approval and reject criteria](#approval-and-reject-criteria) for details. |

### Optional configuration

The following fields are optional.

| Field               | YAML key    | Default | Description                                                                                                                              |
| ------------------- | ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Retry Interval**  | `retry`     | `1m`    | How often Harness polls the Jira issue for a status change.                                                                              |
| **Reject Criteria** | `reject`    | None    | Conditions that cause the pipeline to fail immediately. Go to [Approval and reject criteria](#approval-and-reject-criteria) for details. |
| **Log Level**       | `log_level` | `info`  | Verbosity of step logs. Accepted values: `info`, `warn`, `error`.                                                                        |

### Advanced settings

The step supports the same advanced settings as any other step.

| Setting                   | Description                                                           |
| ------------------------- | --------------------------------------------------------------------- |
| **Timeout duration**      | Maximum time the step is allowed to run before Harness terminates it. |
| **On failure**            | What Harness does when the step fails.                                |
| **Strategy**              | Loop the step using a matrix, for, or while strategy.                 |
| **Conditional execution** | Skip the step based on a JEXL condition.                              |

Go to [Steps overview](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1.md) for details on these settings.

***

## Approval and reject criteria

`approve` is required; `reject` is optional. Both fields accept the same criteria format.

### Conditions

Click **+ Add criteria** and select **Conditions** as the condition type. Then choose your match mode and define each condition.

**Match mode**

| Value              | Behavior                                                          |
| ------------------ | ----------------------------------------------------------------- |
| **Any condition**  | Pipeline advances when at least one condition matches (OR logic). |
| **All conditions** | Pipeline advances only when every condition matches (AND logic).  |

Each condition has three fields: **Name** (the Jira field name), **Operator**, and **Value**.

In YAML, conditions use the field name as the key and the operator as a nested key:

```yaml
approve:
  match-any-condition: true
  conditions:
    - status:
        eq: "Done"
    - priority:
        eq: "High"
```

Set `match-any-condition: true` for OR logic. Omit it or set it to `false` for AND logic.

### JEXL expression

Select **JEXL Expression** as the condition type and enter an expression that evaluates to `true` or `false`. You can reference Jira issue fields using expressions.

***

## YAML reference

The following table lists all supported keys for the `jiraApproval` step.

| Key                           | Required | Type     | Description                                                                                    |
| ----------------------------- | -------- | -------- | ---------------------------------------------------------------------------------------------- |
| `connector`                   | Yes      | string   | Identifier of the Jira connector. Use `account.`, `org.`, or no prefix for the matching scope. |
| `issue`                       | Yes      | string   | Jira issue key (for example, `PROJ-1234`).                                                     |
| `approve`                     | Yes      | object   | Criteria that advance the pipeline.                                                            |
| `approve.match-any-condition` | No       | boolean  | `true` for OR logic; `false` or absent for AND logic.                                          |
| `approve.conditions`          | No       | list     | List of field conditions. Each entry: `field-name: { operator: value }`.                       |
| `retry`                       | No       | duration | Polling interval. Default: `1m`.                                                               |
| `reject`                      | No       | object   | Criteria that fail the pipeline. Same structure as `approve`.                                  |
| `log_level`                   | No       | string   | Log verbosity: `info`, `warn`, `error`. Default: `info`.                                       |

Supported operators: `eq`, `not_eq`, `in`, `not_in`.

***

## Next steps

* Go to [ServiceNow approval step](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1/approvals/service-now-approval.md) for ticket-based approvals.
* Go to [Steps overview](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1.md) to review all step types.
* Go to [Connect to Jira](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/connectors/ticketing-systems/connect-to-jira.md) to set up the required connector.
* Go to [On failure](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/strategy/on-failure.md) to handle step-level failures.
