> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Jira Data Center Integration (Coming soon...)

> Complete guide for setting up Jira Data Center integration with OpenHands Cloud, including service account creation, personal access token generation, webhook configuration, and workspace integration setup.

# Jira Data Center Integration

## Overview

The Jira Data Center integration enables you to use OpenHands to automatically implement requirements from Jira tickets. When you create a ticket with clear requirements and acceptance criteria, OpenHands can read the ticket, generate an implementation plan, and create a pull request in your linked repository.

### How It Works

Once configured, you can request OpenHands to work on a Jira ticket by:

1. **Specify the Repository**: Include the repository location in either:
   * The ticket body itself, or
   * A comment on the ticket

2. **Trigger OpenHands**: Activate the agent using one of these methods:
   * Add an `openhands` label to the ticket
   * Comment with: `@openhands please review these requirements, generate a plan, and then proceed with implementation`

OpenHands will then read the ticket, understand the requirements, and generate a conversation that results in a pull request implementing the requested changes.

### Example Ticket

Here's an example of how to structure a Jira ticket for OpenHands:

**Title:** Add SAML Support

**Body:**

```
As an administrator for my web app, I want to configure SAML so I can provide secure access to my system.

GitHub repository: AcmeCo/WebApp

AC:
- Verify an administrator can configure SAML settings
- Verify an end user can authenticate via SAML
```

After creating this ticket, you can either add the `openhands` label or comment with `@openhands please review these requirements, generate a plan, and then proceed with implementation` to start the automation process.

***

## Platform Configuration

### Step 1: Create Service Account

1. **Access User Management**
   * Log in to Jira Data Center as administrator
   * Go to **Administration** > **User Management**

2. **Create User**
   * Click **Create User**
   * Username: `openhands-agent`
   * Full Name: `OpenHands Agent`
   * Email: `openhands@yourcompany.com` (replace with your preferred service account email)
   * Password: Set a secure password
   * Click **Create**

3. **Assign Permissions**
   * Add user to appropriate groups
   * Ensure access to relevant projects
   * Grant necessary project permissions

### Step 2: Generate API Token

1. **Personal Access Tokens**
   * Log in as the service account
   * Go to **Profile** > **Personal Access Tokens**
   * Click **Create token**
   * Name: `OpenHands Cloud Integration`
   * Expiry: Set appropriate expiration (recommend 1 year)
   * Click **Create**
   * **Important**: Copy and store the token securely

### Step 3: Configure Webhook

1. **Create Webhook**
   * Go to **Administration** > **System** > **WebHooks**
   * Click **Create a WebHook**
   * **Name**: `OpenHands Cloud Integration`
   * **URL**: `https://app.all-hands.dev/integration/jira-dc/events`
   * Set a suitable webhook secret
   * **Issue related events**: Select the following:
     * Issue updated
     * Comment created
   * **JQL Filter**: Leave empty (or customize as needed)
   * Click **Create**
   * **Important**: Copy and store the webhook secret securely (you'll need this for workspace integration)

***

## Workspace Integration

### Step 1: Log in to OpenHands Cloud

1. **Navigate and Authenticate**
   * Go to [OpenHands Cloud](https://app.all-hands.dev/)
   * Sign in with your Git provider (GitHub, GitLab, or BitBucket)
   * **Important:** Make sure you're signing in with the same Git provider account that contains the repositories you want the OpenHands agent to work on.

### Step 2: Configure Jira Data Center Integration

1. **Access Integration Settings**
   * Navigate to **Settings** > **Integrations**
   * Locate **Jira Data Center** section

2. **Configure Workspace**
   * Click **Configure** button
   * Enter your workspace name and click **Connect**
     * If no integration exists, you'll be prompted to enter additional credentials required for the workspace integration:
       * **Webhook Secret**: The webhook secret from Step 3 above
       * **Service Account Email**: The service account email from Step 1 above
       * **Service Account API Key**: The personal access token from Step 2 above
       * Ensure **Active** toggle is enabled

<Note>
  Workspace name is the host name of your Jira Data Center instance.

  Eg: [http://jira.all-hands.dev/projects/OH/issues/OH-77](http://jira.all-hands.dev/projects/OH/issues/OH-77)

  Here the workspace name is **jira.all-hands.dev**.
</Note>

3. **Complete OAuth Flow**
   * You'll be redirected to Jira Data Center to complete OAuth verification
   * Grant the necessary permissions to verify your workspace access. If you have access to multiple workspaces, select the correct one that you initially provided
   * If successful, you will be redirected back to the **Integrations** settings in the OpenHands Cloud UI

### Managing Your Integration

**Edit Configuration:**

* Click the **Edit** button next to your configured platform
* Update any necessary credentials or settings
* Click **Update** to apply changes
* You will need to repeat the OAuth flow as before
* **Important:** Only the original user who created the integration can see the edit view

**Unlink Workspace:**

* In the edit view, click **Unlink** next to the workspace name
* This will deactivate your workspace link
* **Important:** If the original user who configured the integration chooses to unlink their integration, any users currently linked to that integration will also be unlinked, and the workspace integration will be deactivated. The integration can only be reactivated by the original user.

### Screenshots

<AccordionGroup>
  <Accordion title="Workspace link flow">
    <img src="https://mintcdn.com/allhandsai/iROoLZU8-F_m1dYO/openhands/static/img/jira-dc-user-link.png?fit=max&auto=format&n=iROoLZU8-F_m1dYO&q=85&s=a6e5d4ae78a5f360d4333eb8f27ff3a2" alt="workspace-link.png" width="402" height="430" data-path="openhands/static/img/jira-dc-user-link.png" />
  </Accordion>

  <Accordion title="Workspace Configure flow">
    <img src="https://mintcdn.com/allhandsai/iROoLZU8-F_m1dYO/openhands/static/img/jira-dc-admin-configure.png?fit=max&auto=format&n=iROoLZU8-F_m1dYO&q=85&s=6f774db7d6f431e022ec20dfedc86f7a" alt="workspace-link.png" width="402" height="765" data-path="openhands/static/img/jira-dc-admin-configure.png" />
  </Accordion>

  <Accordion title="Edit view as a user">
    <img src="https://mintcdn.com/allhandsai/iROoLZU8-F_m1dYO/openhands/static/img/jira-dc-user-unlink.png?fit=max&auto=format&n=iROoLZU8-F_m1dYO&q=85&s=0daec40d89839a8f8e8d23cb6b8e961a" alt="workspace-link.png" width="402" height="385" data-path="openhands/static/img/jira-dc-user-unlink.png" />
  </Accordion>

  <Accordion title="Edit view as the workspace creator">
    <img src="https://mintcdn.com/allhandsai/iROoLZU8-F_m1dYO/openhands/static/img/jira-dc-admin-edit.png?fit=max&auto=format&n=iROoLZU8-F_m1dYO&q=85&s=2a2530f5ac82ca93f3e15ae98fc216f2" alt="workspace-link.png" width="402" height="769" data-path="openhands/static/img/jira-dc-admin-edit.png" />
  </Accordion>
</AccordionGroup>
