> 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/misconfigurations-premium/open-jira-ticket.md).

# Open Jira ticket

To streamline the working process to remediate any SPM misconfigurations, 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. [Company prefix](#id-1.-locate-company-prefix)
2. [Project ID](#locate-project-id)

### 1. Locate company prefix

1. Ensure you fulfill the [prerequisites](#prerequisites-for-opening-a-ticket) to open a Jira ticket.
2. In the **Misconfigurations > Remediation** drawer, click **Jira 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%2FMijcx17ypc0OIWZDcEJr%2FSet%20Jira%20account.png?alt=media&amp;token=cc1187f7-4c6e-4e56-a423-a1e4f3b768f1" alt="" width="533"><figcaption></figcaption></figure></div>
3. To locate your **company prefix,** navigate to your Jira account or use [this link](https://team.atlassian.com/your-work?startRedirect=true) to open your Jira workspace via your Confluence homepage.&#x20;
4. Click your **Jira workspace**.
5. Go to the URL address in your browser.&#x20;
6. Copy the company prefix.

{% hint style="info" %}
**For example**: The URL address is `https://docontrol.atlassian.net/`\
The company prefix is `docontrol`.&#x20;
{% endhint %}

6. Enter the **company prefix** in the **Jira settings** screen.
7. Continue to step 2: [Locate project ID](#id-2.-locate-project-id).

### 2. Locate project ID

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

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

#### **Project settings**

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

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

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

1. Go to **Project > View all Projects**.
2. Click the **Project Name** for the relevant project ID.
3. Click **Project Settings** in the lower left corner.
4. Hover over the **Details** button and view the project ID in the navigation bar at the bottom of the browser, for example, `pid = 10000.`&#x20;
5. Enter the **project ID** number in the **Jira settings** screen.
6. Click **Test connection** to check the Jira connection.
7. 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 project 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 **project 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 project ID is 10000.<br>
3. Enter the **project 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 project settings**&#x20;

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

1. Go to **Project > View all Projects**.
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 project ID **number**.\
   Example of project ID number in HTML page:\
   \
   ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcg9wlj9vJ1-LkJKS2oAXxrFeaDKq5rPvYtjp0OSANGCCEffr1Bc1sIpIC5cYDAYctx4GEvIVSzqfufRCNDeHt-23KKxTK5sFDHGCz5XEc6_zq1Y2KlWGGwSFZb9jFRcPu2viKaeIFD7lvHxkROM8qKSUN-?key=ZIBRhrb-JSP4SLMUIEDGUQ)
7. Enter the **project 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 project ID, see the [Jira Knowledge Base](https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html).
{% endhint %}

## 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 **Misconfigurations > Remediation** drawer, 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 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>

{% 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/misconfigurations-premium/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.
