Prembo
Prembo

Reputation: 2256

Annotate hg commit messages (from CLI) with JIRA issue IDs to reference/close issues

I'm a Redmine user and love being able to reference and close Redmine issues from the hg commits. Being able to do so from the version control commit streamlines the workflow a little further.

For example to close Redmine issue #122 you could do the following:

hg commit -m "(Closes #122) Squashed a bug"

Is there any way of annotating hg commits (from the CLI) with the issue IDs for JIRA? Also, taking it a step further, is there a way of annotating time spent on an issue via a commit in a similar way?

What is the usual mechanism of linking issues to Mercurial/BitBucket commits?

Thanks - looking forward to hearing your solutions

Prembo.

Upvotes: 2

Views: 898

Answers (1)

krtek
krtek

Reputation: 26607

A Mercurial plugin exists for JIRA which let you have some of the functionnality you can use with Redmine : https://plugins.atlassian.com/plugins/com.consultingtoolsmiths.jira.plugin.ext.mercurial.mercurial-jira-plugin

For example, if your commit message is: "This fixes JRA-52 and JRA-54" - the commit details would be displayed in a tab when viewing the issues JRA-52 and JRA-54.

Concerning the time spent, I never heard of this functionnality, but maybe it exists somewhere. Oterwhise you can still expand / enhance the plugin to suits your need !

Upvotes: 3

Related Questions