Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira issue status and Gitlab label Edited

Hello, 

Is there any Gitlab and Jira integration function that syncs Gitlab MR label and Jira issue status?

E.g If I put ToDo label on MR - Jira issue status automatically changes to ToDo.

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer Atlassian Team Mar 29, 2021

Hi,

I understand that you have a the Gitlab for Jira Cloud app installed to your Cloud site and are wanting to sync the labels on a Gitlab Merge Request to a corresponding issue status for an issue in Jira.

So far I have not found an exact solution for your ask here.  I did investigate this to see if perhaps we could use Gitlab's webhooks in order to make a call back to Jira Cloud for this change to happen.  I also looked into using Jira Cloud's automation devop triggers here.  Although these can be setup to trigger changes to the Jira issue based on such triggers as a deployment status, this is not always 100% equivalent of the labels used on MR in Gitlab.

The problem I find with either approach is multi-faceted.  These problems include:

  1. Labels in Gitlab and status in Jira need never correspond (you might have to create a label in Gitlab for every possible status that exists in Jira)
  2. Labels in Gitlab do not appear to be mutually exclusive, whereas a single issue in Jira can only have hold a single status at one time.  What is the expected behavior if multiple labels in Gitlab are applied at the same time?  Say if both 'to do' and 'done' are added at the same time, what status does the Jira issue go to?

Instead, I think there is a different way to try manage this, although admittedly this has far less to do with automation and more to do with leveraging the existing capabilities that exists with this integration today.

If you want to transition a Jira issue based on a change such as a commit, pull request, merge, etc, you can already do that if you use the proper Smart Commit message.  For example, when you make a commit in Gitlab, you can create a commit message of:

updating README.md blah blah blah SCRUM-2 #To do

Provided that the Jira issuekey of SCRUM-2 has a transition called 'To do' that the issue can be transitioned to, when Jira sees this it will then automatically execute that transition.  I know this is not exactly what you have asked for, but in my own view I think this is an easier change to make today.  The ask to automatically sync the Gitlab MR label into the Jira issue status is considerably more complex to do for several potential environmental differences mentioned above.

I hope this helps.

Andy

Thank You for answer. We'll implement smart commit messages.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira

Update issues right from the list view in the issue navigator

Hi All, We’ve heard you when you said that it takes too long to make changes to multiple issues - given that you’ll have to open them one by one to make changes. With this release, we are addressin...

11 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you