Skip to main content
Skip table of contents

How to set up Gerrit Code Review integration?

Jigit - Jira GitHub & GitLab supports integration with Gerrit Code Review, allowing you to link Gerrit changesets and reviews with your Jira issues. This enables you to seamlessly bridge the gap between code reviews and project management in Jira. When the Gerrit is integrated with Jira using Jigit, it shows the data in a separate Jira issue view tab.

Configuration

To configure Gerrit Core Review, navigate to the Gerrit tab on the Global configuration page (available only for Jira administrators) and enable the integration.

Since version 6.15.04 multiple instances of Gerrit Code Review tool are supported.

Create a new configuration rule following the next steps:

  1. On the Configuration tab, click the Add button in the bottom right corner.

  2. After you have specified all the necessary parameters click on Ok button to save the new rule.

  3. The Test Connection button allows you to check the connection and communication between Jigit and the connected Gerrit Core Review account.

Please, read the definitions of each parameter you have to specify in the modal window that appears in front of you:

Parameter

Definition

Name

the name of your configuration rule

Enabled

refers to whether the integration with Gerrit Code Review is enabled or disabled

URL

URL to Gerrit Server instance allows the Jigit app to connect to your Gerrit and retrieve information about changesets, reviews, and other related data.

User

username or account that the Jigit app will use to authenticate and interact with your Gerrit to access the REST APIs

Password

the password or authentication token associated with the user account specified in the "User" setting

Gerrit Project

the specific project or repository in your Gerrit instance that you want to integrate with Jigit app. Here you can restrict search results only to particular Gerrit Project.

This parameter is optional. No projects are chosen means that the app will search for all changes in Gerrit.

Use only for Development panel

restricts the Jigit plugin to only be used within the Development panel of Jira

Add Gerrit development panel

display status information into the development panel on the Jira issue view screen

Projects to hide Gerrit

the list of Jira projects where to hide Gerrit information

Projects to show Gerrit

the list of Jira projects where to show Gerrit information

Search for issue in

the list of items where to search for the Jira issue key mentioned

Monitoring window

the time interval during which Jigit will actively monitor and retrieve updates from the Gerrit

Circuit Breaker

With the circuit breaker, you can make Jira more stable when Gerrit is unavailable or having issues. The circuit breaker monitors the connectivity and responsiveness of integrated services such as Jira, GitHub, and GitLab. It keeps track of the success or failure rate of requests made to these services.

Below are the parameters' definitions that help you tweak the circuit breaker according to your system. We recommend starting with the default ones before your start tweaking those.

Parameter

Definition

Failure rate threshold

percent of failures to stop querying Gerrit

Monitoring window

period in seconds during which requests are monitored

Minimum requests

minimum requests to calculate state

Slow request threshold

requests which are longer than interval are treated as slow

Slow requests rate threshold

percent of slow requests to stop querying Gerrit

Silence interval

if problems are detected than plugin stops querying Gerrit for target interval

Gerrit tab

For the Jira end user, this integration is visible on the issue view screen on the Gerrit tab and on the Gerrit panel shown on the right side of the Jira issue view.

Gerrit change should include the issue key to be displayed in the Gerrit tab.

Gerrit display type

Since version 7.06.28, you can select the Gerrit data's List or Table view type.

This is done in Jigit Plugin Config → Global Settings → Gerrit display type.

Above the table view, you see the name of the Gerrit configuration.

Gerrit JQL functions

In Jigit - Jira GitHub & GitLab integration, the JQL (Jira Query Language) function is available for filtering changes in Gerrit.

Jigit leverages the Gerrit REST API to interact with Gerrit and perform JQL-based queries. The JQL function narrows down the Jira issue search result by limiting the number of commits associated with an issue.

In the search query, you need to use the command gerritStatus.

Examples of search queries you can modify to meet your needs:

  • issue in gerritStatus(PROJECT_KEY, STATUS):

issue in gerritStatus("TEST", "open") issue in gerritStatus("TEST", "abandoned") issue in gerritStatus("TEST", "new") issue in gerritStatus("TEST", "merged")

  • issue in gerritStatus(PROJECT_KEY, STATUS, CHANGES_AFTER_DATE):

issue in gerritStatus("TEST", "closed", "2022-10-25"), where date means “since“/”after”


How to link Gerrit changes to Jira issues?

Updated:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.