> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/risk-management/alerts/manage-alerts/open-jira-ticket.md).

# Open Jira ticket

To streamline the working process to remediate alerts, you can automatically open a Jira ticket:

* [First Jira ticket](#first-time-jira-setup) - Start by defining your Jira account in DoControl. This is a one-time process.
* [Subsequent Jira tickets ](#open-subsequent-jira-tickets)- Open a Jira ticket with one click.

## Prerequisites for opening a ticket

To open a Jira ticket in DoControl, make sure to:

* First login to Jira via your browser
* Verify you have permission to create a new Jira ticket

{% hint style="warning" %}

* There is no need to integrate DoControl with Jira in order to open a ticket.
* This functionality is user-based and not company-wide. Each DoControl user needs to configure the Jira URL and the relevant project for streaming tickets.
  {% endhint %}

## First-time Jira setup

The first time you open a Jira ticket, you need to define your Jira account in DoControl with these parameters:

1. [Jira site URL](#id-1.-locate-jira-site-ur)
2. [Space ID](#id-2.-locate-space-id)
3. [Work item type ID](#id-3.-work-item-type-id)

### 1. Locate Jira site URL

1. Ensure you fulfill the [prerequisites](#prerequisites-for-opening-a-ticket) to open a Jira ticket.
2. In the **Misconfigurations > Remediation** tab, click **Ticket**.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F4ThbglRXHr6l23xT2ITI%2FJira_account.png?alt=media&amp;token=a1a849b5-687e-4666-be81-f92642114c52" alt=""><figcaption></figcaption></figure></div>
3. To locate your **Jira site URL,** open Jira in your browser.&#x20;
4. Copy the start of the URL:

   * If you see `/secure/Dashboard.jspa`, take everything before that.​
   * If you see `/browse/KEY-123`, take everything before `/browse`.​
   * If you see `jira/software` or `/secure/RapidBoard.jspa`, take everything before that.

   For example: <https://yourcompany.atlassian.net><br>
5. Continue to [step 2: Locate space ID](#id-2.-locate-space-id).

### 2. Locate space ID

The space ID is essentially the internal identifier for what used to be called a project. Each space has a key and a numeric ID.&#x20;

To locate your **space ID,** use any of these methods:

* [Space settings](#space-settings)
* [REST API](#rest-api)
* [HTML project settings](#html-project-settings)

#### **Space settings**

This is the easiest method for locating the space ID, but not all Jira versions support this functionality.&#x20;

{% hint style="info" %}
To view the Space settings page, you must be a:

* Project administrator for the project, or
* Jira administrator
  {% endhint %}

1. Open the relevant space in Jira.
2. In the left sidebar, click **Manage spaces.**&#x20;
3. Hover over the relevant space: the numeric space ID is embedded at the end of that link. \
   For example, `AB/boards/29.`&#x20;
4. Enter the **space ID** number in the **Jira settings** screen.
5. Click **Test connection** to check the Jira connection.
6. Click **Save & open ticket**.\
   Your Jira ticket is automatically populated with details of the failed security check, and instructions on how to fix it.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F9bQMXx2PZgtXgmGW1ucS%2Fcreate%20issue%20in%20Jira.png?alt=media&amp;token=9be990d3-6266-4637-94fd-e754d81306e7" alt=""><figcaption></figcaption></figure>

#### **REST API**

You can obtain the space ID via the REST API.&#x20;

{% hint style="info" %}
This method does **not** require any administrator privileges.
{% endhint %}

1. Access the following URL:\
   `<JIRA_BASE_URL>/rest/api/latest/project/<project_key>`<br>
2. View the metadata for the project, including the **space ID**, as shown in the output example below:\
   \
   `{ "expand": "description,lead,url,projectKeys", "self": "<JIRA_BASE_URL>/rest/api/latest/project/10000",`` `<mark style="background-color:green;">`"id": "10000"`</mark>`, "key": "SCRUM", "description": "",`\
   \
   In this example, the **space ID** is 10000.<br>
3. Enter the **Space ID** number in the **Jira settings** screen.
4. Click **Test connection** to check the Jira connection.
5. Click **Save & open ticket**.\
   Your Jira ticket is automatically populated with details of the failed security check, and instructions on how to fix it.

#### **HTML space settings**&#x20;

If your Jira version does not support accessing project settings, and you don't have API access, you can inspect your space settings in HTML to locate the project ID:

1. Go to **Spaces > View all spaces**.
2. Click the **Project Name** for the relevant project ID.
3. Click **Project Settings** in the lower left corner.
4. Open the browser inspect window (**F12,** or right-click and select **Inspect**).
5. Click **Ctrl + F** (Windows) or **Cmd + F** (Mac) to search for `projectid` in the HTML page.
6. Copy the space ID **number**.\
   Example of space ID number in HTML page:\
   \
   ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcg9wlj9vJ1-LkJKS2oAXxrFeaDKq5rPvYtjp0OSANGCCEffr1Bc1sIpIC5cYDAYctx4GEvIVSzqfufRCNDeHt-23KKxTK5sFDHGCz5XEc6_zq1Y2KlWGGwSFZb9jFRcPu2viKaeIFD7lvHxkROM8qKSUN-?key=ZIBRhrb-JSP4SLMUIEDGUQ)
7. Enter the **Space ID** number in the **Jira settings** screen.
8. Click **Test connection** to check the Jira connection.
9. Click **Save & open ticket**.\
   Your Jira ticket is automatically populated with details of the failed security check, and instructions on how to fix it.

{% hint style="info" %}
For more information on how to locate the space ID, see the [Jira Knowledge Base](https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html).
{% endhint %}

### 3. Work item type ID

The work item type ID is the internal ID of an issue type, such as a bug, story, or task. Each work item type includes:

* A human-readable name (e.g., bug)
* A numeric ID that Jira uses in configurations (e.g., `10001`)&#x20;

To locate your work item type ID, use any of these methods depending on your privileges:

* [Jira admin rights](#if-you-have-jira-admin-rights)
* [Space admin rights](#if-you-only-have-space-admin-rights)
* [Use the REST API](#use-the-api)

#### If you have Jira admin rights:

1. Go to **Jira Settings >** **Issues.**
2. Click **Issue types.**
3. Click on the relevant issue type.
4. Look at the URL in your browser — it will contain something like:\
   `id=10005`\
   \
   That number is the **work item type ID**.

#### If you only have space admin rights:

1. Open the space > **Space settings > Work item types**.​
2. Click the relevant issue or work item type.
3. Retrieve the ID from the URL.​

#### Use the REST API

1. Enter this command to get all issue types:\
   `GET /rest/api/3/issuetype`
2. The response will include:<br>

   ```
     "id": "10005",
     "name": "Bug",
     "description": "A problem that needs fixing"

   ```

The `"id"` field is the **work item type ID**.

## Open subsequent Jira tickets

After you perform the [first-time Jira setup](#first-time-jira-setup), you can open a Jira ticket with one click.

1. Ensure you fulfill the [prerequisites](#prerequisites-for-opening-a-ticket) to open a Jira ticket.
2. In the **Alerts** page, click **Jira ticket**.\
   \
   ![](https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F6HPjfneU5FUxxsuAzPIs%2FJira%20dropdown.png?alt=media\&token=5ca0cdf8-67a7-4ff6-8751-81dcfa2f7bb3)<br>
3. Click **Open Jira ticket** to open an issue in Jira.\
   Your Jira ticket is automatically populated with details of the alert requiring remediation, with a link to the full alert details.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FW4bg622q91ciUJ3uBEBI%2Fopen%20Jira%20ticket%20alerts.png?alt=media&amp;token=14fe6e1c-1d6e-46c1-9ade-b2dc8af0c25c" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
If you need to redefine your Jira account in DoControl, click **Jira settings**.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/risk-management/alerts/manage-alerts/open-jira-ticket.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
