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.

When a commit is pushed to GitLab that references a Jira issue, the rule transitions an issue to the “in progress” status. You will need an active Jira project with the GitLab app installed and activated with your GitLab credentials.

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

Entrepreneur accompli, Kev Zettler est développeur web principal complet et dispose de plus de dix années d'expérience dans le développement de produits et la création d'équipes à l'aide des méthodologies Agile. Il est un contributeur, auteur et formateur passionné par les technologies open source émergentes telles que DevOps, les crypto-monnaies et la RV/RA. Durant son temps libre, il participe au développement de jeux vidéo indépendants.


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

Simulation workshop

Map illustration

Get started for free

Sign up for our DevOps newsletter

Thank you for signing up