0
votes

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?

3
Just checking.. do you have time tracking enabled in JIRA? - Robert
@Robert "We've enabled time tracking..." So yes. - Mattias
Sorry I overlooked it. Did you check permissions/try to log time manually in JIRA? - Robert
@Robert Yeah, manually logging time works fine and all the time tracking permissions are green. - Mattias
Now I'm not sure if you use BitBucket server or Fisheye. In case it is BitBucket server this may interest you: confluence.atlassian.com/jiracloud/… - they say smart commits are not supported with BitBucket server - Robert

3 Answers

1
votes

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

0
votes

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

0
votes

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