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

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

Smart commit - Transition not working

Hi,

I'm using Bitbucket and Jira to handle my workflow.

When I try to use this command :

git commit -m "TEST-2 #close #comment ici le test"

The column of the ticket doesn't change from "To do" to "Done".
I can see the commit in the ticket details but the transition is not working.

I read this topic:

https://community.atlassian.com/t5/Jira-Core-questions/Smart-commit-not-working/qaq-p/387358

I tried to update my email but the transition are not working. Smart Commit is enabled on DVCS accounts.

 

Can you help me this?

Thank you.

2 answers

1 accepted

0 votes
Answer accepted

Perhaps your jira workflow is stopping that transition or jira is not recognizing "close" as a valid transition.

Can you confirm that you are able to perform the transition manually with the same user as the one in your git config without making any field entry in the transition screen?

Is the jira transition from "to do" to "done" actually called "close"? If your transition label is in French (as I see your comment is), you'll want to use that same label in the git message.

This should not impact it, but the #comment command is not required when using a #transition command.

Thank you Peter for your answer.

"Can you confirm that you are able to perform the transition manually with the same user as the one in your git config without making any field entry in the transition screen?"

I have only one user for now. What do you mean by perform a transition manually? I can change a ticket's column in the Jira Software UI if it's what you mean.

From what I understand the transition are based on commit message, correct?
There's no working transition in my commit tests. Even if the commits are attached to the tickets details.
All my tickets are in the default column "todo" and commits doens't change them from "to do" -> "in progress" like the documentation explain it.

You're right, my column are in french with the defaults names :
à faire / en cours / fini -> todo / in progress / done.

I'm using a next gen project.

I just found that maybe I misunderstood the transition system, I thought smart commit wasn't dependant of the transition system from below:

- https://support.atlassian.com/jira-software-cloud/docs/transition-an-issue/
- https://confluence.atlassian.com/fisheye/transitioning-issues-in-jira-960155432.html#TransitioningissuesinJira-Transitionanissuewithyourcommitmessage

So maybe I need create these kind of diagram to make it work?

Thank you.

Ah... next gen project.

I don't have too much experience with those. They don't have the same concepts as what we have in workflows:

StatusA ===TransiionName===> StatusB

With workflow-based smart commits, the command must be "TransitionName".

With netxtgen project, I think the smart commits command must use the target status/column name. Found this other question

And in this case, the english (default) name might be best.

Try

git commit -m "TEST-2 #done ici le test"
Like Kevin likes this

It works! Thank you very much for your help.

git commit -m "TEST-2 #done your message"
git commit -m "TEST-2 #in-progess place ticket in the in progress column"

 Theses examples are working even if the name of the default column are in french, the tickets move between columns now.

Hey together,

I have developed the last weeks a add-on, which will reject wrong/invalid smart commits via pre receive hook. Example: if there are typos in transition requests or if the request is just not possible, the commit and/or push will be rejected. It also gives you the recommendation, about the current possible transitions.

It seems this extension is helpful in this case.

Check it out: Smart Commits Checker for Bitbucket 

Feedback is always welcome.

Cheers

Benjamin

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

61 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