Possible to manually add a BitBucket commit to JIRA issues?

I forgot to add the Issue key to a commit message the other day. Is there any way to manually attach/link that commit to the issue in JIRA (as if I had included the issue key in the commit message)?

I know there are ways of changing the commit message through git, but the general rule of thumb is not to do it with commits which have already been pushed......

If this isn't currently possible, it would be a great feature to add!!

9 answers

1 accepted

This widget could not be displayed.

If a commit has been already "pushed" then you can't edit it (as far as I know). But JIRA DVCS connector can only sync commits which contains issue keys, but you might consider adding a commit with something like "to sync with JIRA".

All the best.

Thanks Razaq, but my goal is to get the changed code from the earlier commit to appear in the issue's comments. Unless I'm missing something, even if I perform another commit with the issue's key, the relevant code (from the earlier commit) won't appear in the issue as the new commit will not include the old changes....

Had a feeling this wouldn't be possible, but could it be considered as a new feature? It surely shouldn't be too hard to show a list of recent BitBucket commits and then link a commit - and the changed code - with a specific issue in JIRA?

Would be great if you can submit a feature request in the DVCS Connector issue tracker. You might need to setup an account before you be able to.

Doing that now, thanks Razaq.

+1 On that feature request. I can try to get my devs to link during the commit but people are certainly going to forget periodically.

+1 here as well. This is a real pain when you have previous commits that you want to associate with a ticket. Sometimes tickets are created after a fix is done to keep history after an emergency fix, etc.

This widget could not be displayed.

Please, vote here for this feature.

https://jira.atlassian.com/browse/JSW-14378

This widget could not be displayed.

+1 here as well.

This widget could not be displayed.

+ 1 too

This widget could not be displayed.

+1 here as well!

This widget could not be displayed.

FYI the feature request is https://jira.atlassian.com/browse/DCON-256

This widget could not be displayed.

old issue, current need

+1

This widget could not be displayed.

Older messages have to be force pushed - in the link you provided, even, this is what they say, 

We strongly discourage force pushing, since this changes the history of your repository. If you force push, people who have already cloned your repository will have to manually fix their local history. For more information, see "Recovering from upstream rebase" in the Git manual.

What Justin Greenwood said! If you screw the repo you can recover it with reflog, etc (not easy but possible), but you still can end up with bitbucket's view on the world is different from your local git repo. So really force-push is evil as it is and besides bitbucket is not always great in handling that

This widget could not be displayed.

You can use GIT to amend past commits. http://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit-in-git

If you just need to change the message, use this link:

https://help.github.com/articles/changing-a-commit-message/

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

199 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you