# Search Jira issues

> Finds issues with a JQL search, up to 100, for the steps after it.

Source: https://docs.go-lumen.ai/reference/steps/jira-search-issues

## At a glance

| Property | Value |
| --- | --- |
| **Step name** | `jira-search-issues` |
| **Resource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palette group, category** | read, jira |
| **Credits** | **0.2** credits each time it succeeds |
| **Side effects** | no |
| **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 |
| --- | --- |
| `issues` | array |
| `count` | number |
| `truncated` | boolean |

## 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) |
| `jql` (required) | string |  | A Jira search, such as project = PROJ AND status = "To Do" ORDER BY created DESC. (minLength 1; maxLength 2000) |
| `max` | integer | `20` | Max caps the issues returned: 1 to 100, default 20. (minimum 1; maximum 100) |

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

## Example

Open tickets of one supplier

```yaml title="config"
jql: project = OPS AND labels = supplier AND statusCategory != Done ORDER BY created
  DESC
max: 10
```

## Use it in a flow

A node that runs `jira-search-issues` 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-search-issues-example
  namespace: tenant-acme
spec:
  displayName: "Search Jira issues"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [jira-search-issues]
  nodes:
    - id: jira-search-issues
      stepRef: {name: jira-search-issues}
      config:
        jql: project = OPS AND labels = supplier AND statusCategory != Done ORDER BY created
          DESC
        max: 10
```
