Close

Automatically transition issue status in Jira and GitLab

Kev Zettler Headshot
Kev Zettler

Full stack web developer, DevOps

This guide demonstrates how to create a Jira automation rule that integrates with GitLab.

Time

5 Minute Read.

Audience

You’re an experienced user of Jira Software and GitLab.

Prerequisites

You are an existing GitLab customer. Get the GitLab for Jira integration here.

If you’re new to GitLab, get started here.

You have an active Jira project with the GitLab application installed and configured. Get started with Jira here.

Step 1. Add automation

On your Jira project page, click the add automation button. Then, select the Branch, commit or pull requests option.

Step 1 in adding an automation in Jira on Jira project page

Step 2. Create a new trigger

Search for and select the Commit created trigger. This will trigger the rule when a commit happens.

Search for and select the Commit created trigger. New trigger. Triggers start the execution of a rule. Triggers can listen for events or be scheduled to run.

Step 3. Create a new condition

Search for and select the Issue fields condition. This will restrict the actions performed to issues that match certain field conditions.

Search for and select the Issue fields condition. New condition. Actions will only execute if all conditions preceding them pass.

Set the condition so the Status field equals “selected for development”. This status may not exist in your project and you may need to create it or use an alternative. Click Save to continue.

Issue fields condition. Checks whether an issue's field meets a certain criteria. Field: Status; Condition: equals; Value: “selected for development”

Step 4. Create a Transition issue

Search for and select the Transition issue action, which will transition the issue to a new status. 

New action. Actions perform changes to a system. "Trans" selected under "All actions". Transition issue: transition an issue to a specific status

We will configure the Transition issue action so that the destination status updates to “in progress”. Click Save.

Transition an issue from one status to another, through a workflow. Choose the status to transition the issue to: Destination status: In progress

Step 5. Enter a name

Now enter a name for the rule. We used “Transition issue on commit”. Click the Turn It On button. The final rule summary should look like the following: 

The final rule summary

 

The rule is complete and can be triggered by the following steps:

  1. Create an issue with the status “Selected for development”  in Jira.
  2. Create a commit and push to GitLab that references the issue key.

Once these actions are taken, the rule will trigger and move the issue to “In progress” status. You can monitor the rule by visiting the Audit Log, which will indicate any configuration errors with the rule and help with debugging. 

Be sure to check out hundreds of other rules in our Automation Template Library.

Kev Zettler
Kev Zettler

Kev is a lead full stack web developer and serial entrepreneur with over a decade of experience building products and teams with agile methodologies. He is a passionate contributor, author, and educator on emerging open source technologies like DevOps, cryptocurrency, and VR/AR. In his free time, he participates in indie game development jams.


Share this article

Recommended reading

Bookmark these resources to learn about types of DevOps teams, or for ongoing updates about DevOps at Atlassian.

Devops illustration

DevOps community

Devops illustration

DevOps learning path

Map illustration

Get started for free

Sign up for our DevOps newsletter

Thank you for signing up