1

We have a JIRA Cloud project hooked to a Bitbucket repo. We've enabled time tracking and made sure all the user emails are correct.

Edit: I recently noticed that my commit author was NOT the correct user, but that is fixed now and the commits recognize my avatar and everything.

We have also enabled smart commits for the repo.

Still, when we make a commit with the issue key and the syntax #time 1h, the issue pops up in the Jira project but no time is logged. Any ideas why or how I might go about debugging this?

Mattias
  • 1,111
  • 1
  • 14
  • 23
  • Just checking.. do you have time tracking enabled in JIRA? – Robert Feb 09 '16 at 09:35
  • @Robert "We've enabled time tracking..." So yes. – Mattias Feb 09 '16 at 09:36
  • Sorry I overlooked it. Did you check permissions/try to log time manually in JIRA? – Robert Feb 09 '16 at 09:47
  • @Robert Yeah, manually logging time works fine and all the time tracking permissions are green. – Mattias Feb 09 '16 at 09:49
  • Now I'm not sure if you use BitBucket server or Fisheye. In case it is BitBucket server this may interest you: https://confluence.atlassian.com/jiracloud/integrating-jira-cloud-with-bitbucket-server-735643014.html - they say smart commits are not supported with BitBucket server – Robert Feb 09 '16 at 09:54
  • @Robert We're using Bitbucket Cloud. I know smart commits worked with time tracking on a different repo in the same account when I first started testing Jira about a month ago, so that shouldn't be the problem. – Mattias Feb 09 '16 at 10:26
  • are smart commits enabled for that repo? (It is configurable by repo) You can check on the dvcs accounts admin page – Gene Taylor Feb 16 '16 at 21:28
  • @GeneTaylor yeah, sorry I left that out in my question. I've updated it with some more info! – Mattias Feb 17 '16 at 07:00

3 Answers3

2

For smart commits to work, the email address of the committer must match an email address of a JIRA user

Gene Taylor
  • 541
  • 2
  • 10
  • So the committer email on Bitbucket uniquely maps to a JIRA user? And you are seeing the commit show up in the development panel for the JIRA issue? – Gene Taylor Feb 18 '16 at 09:32
  • Sorry, was just checking that the most likely causes of problems were not present. If you are still having a problem with this feel free to raise a ticket with support at Atlassian. (disclosure: I work for Atlassian and was involved in work on this feature) – Gene Taylor Feb 18 '16 at 12:23
0

Found the issue: The smart commits do not accept adding commands on new lines in the commit message, without referencing every command with a issue key first.

So, this is how I would do it (which doesn't work):

Commit message here.

JIR-123

#time 1h
#any other command

And here's how it's supposed to be (which seems to work for us as well):

Commit message here.

JIR-123 #time 1h
JIR-123 #any other command

For more details, see the discussion over here: https://jira.atlassian.com/browse/DCON-463

Mattias
  • 1,111
  • 1
  • 14
  • 23
0

Just wanted to add make sure you check the local git global variable for the email address. That email address must match your JIRA user account email address.

The only syntax that worked for us was:

TASKID-1234 #transition-name TASKID-1234 #comment this is a test
lxg
  • 12,375
  • 12
  • 51
  • 73