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:
I tried to update my email but the transition are not working. Smart Commit is enabled on DVCS accounts.
Can you help me this?
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:
So maybe I need create these kind of diagram to make it work?
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.
git commit -m "TEST-2 #done ici le test"
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.