# Automating Jira Ticketing

In addition to [creating Jira tickets from OX](https://docs.ox.security/ticketing-and-messaging/ticket-management/jira), you can automate several aspects of how security issues are tracked and updated in Jira. These automations help you sync key information between platforms, reduce manual updates, and ensure consistency across issue workflows.

You can automatically add comments to Jira tickets based on actions taken in OX, set due dates aligned with your SLAs or custom rules, and map issue severity to Jira priorities. These capabilities improve collaboration between security and development teams by keeping Jira issues accurate and up to date.

You can also dynamically populate Jira ticket fields using contextual values from OX issues. This allows required Jira custom text fields and labels to be automatically filled with issue-specific data when a ticket is created, instead of using static values.

The following automated capabilities are available:

* [Adding comments to Jira tickets](https://docs.ox.security/ticketing-and-messaging/ticket-management/jira/page-1)
* [Mapping default due dates](#mapping-default-due-dates)
* [Mapping Jira priorities](#mapping-jira-priorities)
* [Closing Jira tickets](#closing-jira-tickets)
* [Using custom Jira fields](#using-custom-jira-fields)

## Mapping default Due Dates

You can add to a Jira ticket a custom field named Due Date and then configure a default Due Date value in OX platform based on the OX issue severity. This helps ensure that tickets align with your SLA expectations without requiring manual date entry.

> **Note:** Jira ticket must include the Due Date field for this mapping to work. If you manually change the value of the Due Date parameter in Jira while creating the ticket, that value overrides the default defined in OX.

For example, if a critical issue has a 3-day SLA, the Due Date parameter in Jira will automatically be set to 3 days from the ticket creation date, unless manually overridden.

**To map default Due Dates:**

1. Go to **Settings > TICKETING AND MESSAGING**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-3c6575683bfd218ab99736023ac2c74f640e4fe3%2FDue_Dates.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

2. Enable **Add Due Dates to Jira tickets**.
3. Set the **Due Date** parameter in Jira in one of the following ways:

* **Use Due Dates from OX SLA Settings**: The **Due Date** is automatically taken from the **Settings > SLA** definitions in OX.
* **Set default Due Dates**: Define manually SLA for each severity level. These settings override all the other SLA settings for the selected issues.

## Mapping Jira Priorities

You can map issue severity levels in OX to the Priority parameter values in Jira. This ensures that each ticket created reflects the appropriate level of urgency within your existing Jira workflows.

For example, mappings might include:

* `Critical` severity → `Highest` Jira priority
* `High` severity → `High` Jira priority
* `Medium` severity → `Medium` Jira priority

After you configure these settings, all the they are applied automatically for all the new when tickets created for OX issues.

**To map priorities:**

1. Go to **Settings > TICKETING AND MESSAGING**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-71df66e9286eff61b7b7a32e949899d8e8dda468%2FPrioritization.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

2. Enable **Map severity to Jira Priority field**.
3. Enable the severity levels that you want to map and define the **Priority** value in Jira associated with each severity level in OX.

## Closing Jira tickets

You can configure automatic Jira ticket closure when an issue is resolved or excluded.

Depending on your organization's Jira status settings, you can select the status that is applied to closed tickets.

The process runs automatically once configured.

**To set automatic status updates:**

1. Go to **Settings > TICKETING AND MESSAGING**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-94203faac73c3dc7a11696019e7b6b8024473e48%2Fclose%20issues.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

2. Enable the automatic Jira ticket closure option(s).
3. For each closure option, set the status that you want to appear in Jira when the ticket is closed.

## Using custom Jira fields

OX supports Jira custom fields when creating tickets. Custom fields are pulled from your Jira configuration and displayed in OX based on your project setup.

When creating or configuring a Jira ticket, custom fields appear alongside the default fields. You can populate these fields with fixed values or dynamic values using `@`.

Dynamic values are supported only when the field meets both conditions:

* The field is required in Jira
* The field type is text (string)

If a field is not required, it does not appear in OX. If the field is not a text field, dynamic values are not supported.

Fixed values apply the same value to all tickets. Dynamic values are resolved per issue, allowing you to map Jira fields to relevant issue data without manual updates.

{% hint style="info" %}
Custom fields are defined and managed in Jira. OX displays only the fields available in your Jira project configuration.
{% endhint %}

Examples:

* **License field**\
  Enter `@license` to populate the field with the license of the affected component for each issue.
* **Application name field**\
  Enter `@app.name` to insert the relevant application name per ticket.
* **Custom “Component” field**\
  Enter `@library.name` to include the vulnerable library name.
* **Labels field**\
  Enter `@tags` to add all related tags, or `@tags.github` to include GitHub topics only.
* **Static vs dynamic**\
  Enter `test` → all tickets include the value *test*\
  Enter `@license` → each ticket includes the actual license based on the issue
