# Two-way sync for Jira

**BetterBugs.io** and **Jira** integration just got more powerful with the **two-way commenting** and **status sync feature**! Now, you won't have to switch between BetterBugs.io and Jira to add or track comments and task status updates.

### How Does the Two-way Sync for Jira and BetterBugs Work?

Whenever you add any comment to the Jira ticket created using BetterBugs.io, it will automatically get added to the connected bug report and vice versa. Similarly, the statuses of the reports will also be auto-synced between BetterBugs.io and Jira.

{% hint style="warning" %}
**PRE-CONDITION:** There should be a **one-to-one connection** between the **BetterBugs.io report** and the **Jira project** for these features to work. This means that if the same report is shared with more than one Jira project, the two-way sync action won’t happen.
{% endhint %}

### Enabling the Two-way Sync Feature for An Existing Jira Integration

The two-way Jira sync will work by default when you connect BetterBugs.io with your Jira project for the first time.

However, to enable this feature for an existing connection between a BetterBugs.io report and the Jira project, you need to **disconnect and reconnect** your Jira project to BetterBugs.io project.&#x20;

{% hint style="info" %}
**IMPORTANT NOTE:** This step is necessary to update the permissions required for two-way commenting and status updates.
{% endhint %}

### How to Sync Comments: BetterBugs.io and Jira \[Step-by-Step from Scratch]

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBzBhuIUDDav7ztnadaoO%2Fuploads%2FKAcmvS9Bcagg4VsSJh6g%2F01-Jira-2-way-Comment-Sync.mp4?alt=media&token=0a17883c-95d9-4197-87d6-0337801e76bc>" %}
Two-Way Jira Sync for Comments: **Jira —> BetterBugs.io | Video Demo**
{% endembed %}

{% stepper %}
{% step %}

#### Capture the Bug and Add Bug Details

Use the BetterBugs extension to capture the bug and add details for it. You can add the details (*Title + Quick Summary + Steps to Reproduce*) manually in the description area manually or automatically with the "**AI**" toggle.
{% endstep %}

{% step %}

#### Select BetterBugs Workspace and Project Integrated with Jira

From the two dropdowns above the description area, select:

* **BetterBugs Workspace**
* **BetterBugs Project** (that you integrated with Jira)
  {% endstep %}

{% step %}

#### Select Jira Issue from "+Send to Your PM Tool" Dropdown, Select Jira Issue, and Populate Jira Fields, and click "Next".

Open "**+ Send to your PM Tool**" dropdown and select "**Jira Issue**" > Populate Jira Fields for the report: **Site URL**, **Project**, **Issue Type**, and **others** and click "**Next".**
{% endstep %}

{% step %}

#### Create Session

From the top right, click "**Create Session**". This instantly creates a Jira ticket.
{% endstep %}

{% step %}

#### Add a Comment in Jira Ticket

Add a comment to the Jira ticket you just created.
{% endstep %}

{% step %}

#### Check for the Newly Added Comment in BetterBugs.io Report

Check for the same comment in the BetterBugs.io report’s [**Comments/Activities**](https://docs.betterbugs.io/product-features/comments-activities) tab at the bottom right of your screen. The comment would be instantly available in your BetterBugs.io report, just as in your Jira ticket.&#x20;
{% endstep %}

{% step %}

#### Add a Comment in your BetterBugs.io Report

Alternatively, try adding a comment to the BetterBugs.io report. It should be available instantly on your Jira ticket.&#x20;
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The two-way sync feature also works when you **update/delete comments** in either workspace.
{% endhint %}

### User Mentions in Comments

You can also mention other users in the comments. If the mentioned user is unavailable in either workspace (Jira or BetterBugs.io), their email or account ID will be displayed by default.

### How to Sync Statuses: BetterBugs.io and Jira

#### **Status Mapping**

| Jira               | BetterBugs.io |
| ------------------ | ------------- |
| **To Do**          | Open          |
| **DONE**           | Closed        |
| **Other statuses** | In Progress   |

{% hint style="info" %}
The status sync between your bug report and Jira works similarly to the comment sync action.&#x20;
{% endhint %}

### How to Sync Statuses Between BetterBugs.io and Jira \[Step-by-Step from Scratch]

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBzBhuIUDDav7ztnadaoO%2Fuploads%2F0bDWcIUuWVOvDgr12Tk0%2F02-Jira-2-Way-Status-Sync.mp4?alt=media&token=273403a5-8709-4430-acaf-bf489313aa40>" %}
Two-Way Jira Sync for Status: **Jira —> BetterBugs.io | Video Demo**
{% endembed %}

{% stepper %}
{% step %}

#### Capture the Bug and Add Bug Details

Use the BetterBugs extension to capture the bug and add details for it. You can add the details (*Title + Quick Summary + Steps to Reproduce*) manually in the description area manually or automatically with the "**AI**" toggle.
{% endstep %}

{% step %}

#### Select BetterBugs Workspace and Project Integrated with Jira

From the two dropdowns above the description area, select:

* **BetterBugs Workspace**
* **BetterBugs Project** (that you integrated with Jira)
  {% endstep %}

{% step %}

#### Select Jira Issue from "+Send to Your PM Tool" Dropdown, Select Jira Issue, and Populate Jira Fields

Open "**+ Send to your PM Tool**" dropdown and select "**Jira Issue**" > Populate Jira Fields for the report: **Site URL**, **Project**, **Issue Type**, and **others** and click "**Next".**&#x20;
{% endstep %}

{% step %}

#### **Check BetterBugs.io Report Status in the "Details" Section**

Open the "**Details**" section in your report (below the description area) and ensure that its set to "**Open**" \[This is equal to **TO DO** status in Jira]
{% endstep %}

{% step %}

#### Create Session

From the top right, click "**Create Session**". This instantly creates a Jira ticket.
{% endstep %}

{% step %}

#### Change Jira Ticket Status to "DONE" and Check for the Status Sync in BetterBugs.io Report

In your Jira ticket, set the status to "**DONE**" and check for the status sync in BetterBugs.io bug report. The bug report should now be marked as "**CLOSED**".
{% endstep %}
{% endstepper %}
