DVCS is linking, but smart comments are not working

Carlos Mostek November 10, 2012

I've successfully linked my bitbucket account to my JIRA account, I can tell because the commits are linking to the issues. However, I have smart commits enabled, but for some reason the comments are not getting added to the issue.

Example:

https://monthlymealplanner.atlassian.net/browse/MMP-124

If you click on the commits section you can see the commit associated with this ticket. You can even see that the comment is formatted correctly, but the comment did not get added to the ticket.

2 answers

1 accepted

0 votes
Answer accepted
Carlos Mostek November 11, 2012

Okay I figured it out. It was an issue with committing inside of Eclipse.

To fix this I went to the properties on my project, to the Mercurial section. In there I had to set my "Default commit name" to "My Name <myemail@address.com>", the same way I had it set in my .hgrc file.

Also, keep in mind, this affects the commits, NOT the push command. I confused myself because I changed it after committing, but before pushing, which, of course, did not work. I then tried doing a new commit and it did work.

Thanks, Matthew, you did point me in the right direction, though it was confusing why it wasn't working when I was sure my bitbucket and JIRA accounts had the same address. They did, but I wasn't logging the right email when committing on my local machine before pushing to bitbucket.

0 votes
Matthew Hunter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 11, 2012

Hi,

According to https://confluence.atlassian.com/display/BITBUCKET/Processing+JIRA+issues+with+commit+messages:

The user's email address in GitHub/Bitbucket must match the user's email address in JIRA otherwise only the commit activity will be shown.

The user that made the commit in bitbucket has to have a corresponding user in JIRA with the same email address in JIRA and they also have to have permission to add a comment. This is because JIRA will post the comment from that user, so if they don't have permission to add a comment then the connector won't be able to do so. Try creating a user with the correct project permissions and committing again. :)

Cheers,

Matt

Carlos Mostek November 11, 2012

I looked at my commit and it was from the hg user because I was using ssh. So, I changed it to https and used my mostekcm user. I double checked that both my mostekcm bitbucket user and my JIRA mostekcm user have the same email address. They do: carlos@monthlymealplanner.com. I did another push. I see the commit register, but still no comment. The repository that I am committing to in bitbucket is a group repository. Any chance that could be responsible? I would have thought it would have checked the user that did the checkin against the user in JIRA.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events