Is it possible to manually link a commit to a JIRA issue i.e. not putting the JIRA issue in the commit message? I'm using mercurial if that makes a difference.
Having googled it does seem like the feature is alluded to but I can't find anything definitive.
If it isn't possible are there any alternative such as changing commit comments later or enforncing commit comments to have a JIRA issue in them?
It is not possible to manually link a JIRA issue to a changeset without changing the commit message to contain the JIRA issue key, which means you will have to edit the history of your repository.
Unfortunately, it isn't trivial to edit the history in Mecurial. See this plugin http://mercurial.selenic.com/wiki/HisteditExtension for how you might do it. But it isn't something that I would reocmmend doing.
You could install a pre-commit hook (see http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html) which will enforce that each commit message have the JIRA issue key. This will stop the problem of missing links between issues and changesets.
Would it be possible to write a plugin for JIRA that puts a new link type in the "More Actions" -> Link menu off of an issue that would let you create a link that showed up in the "Issue Links" section on the issue? If that's possible, I might be interested in writing a plugin to do it. Then, once we have the link to a changeset in the Issue Links section, we update the FishEye plugin to add looking through there as well as doing the standard RPC search to FishEye for tags in commit messages.
Rewritting repository history is a big no for many use cases. In git this not only makes a repository 'incompatible' with its all existing forks, but also invalidates any signed tags on the affected branches.
And there are many scenarios when one can end with a commit which needs to be linked to an JIRA issue, but does not contain the issue key in the commit:
– user mistakes. Even best pre-commit and pre-update hooks won't help when a user have more than one issue assigned he can refer. If he refers wrong, this stays in the commit message.
– imports of legacy code. The code may contain other keywords to refer to issues, which could have been migrated to JIRA.
– it could be found after a fact, that an issue has been fixed by some commit
Manual (and programaticall, via API) linking is IMHO a must have for these applications.
There needs to be a way to point into Fisheye from jira other than tags in commit messages. Forcing Jira issues to be added during commits isn't enough since more than one issue may need to point at the same source changes. Issues sometimes also need to point to commits already made.
Why can't Jira/Fisheye work like Jira/Confluence, link from anywhere to anywhere and get an automatic reciprocal link??
As a workaround, you can add custom number field, like "changeset", to the issue. Then this would be used with a SIL Scripted field to dynamically create a clickable link. I did this, but using the created date of the ticket to perform a fisheye search.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG