Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Manually link FishEye git commit and Jira issue ?

Vladimir Silchanka May 25, 2015

We're evaluating Jira&Fish eye and one of the main issues we have is that we've no idea how to connect changeset and JIRA issue, if a developer forgot to mention JIRA issue ID in the commit message.

By connection I mean something that would add commit to the JIRA issue list of commits.

Is there any way to achieve this ?

 

Thanks

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vladimir Silchanka September 9, 2015

Not sure my company would agree to pay for the plugin sad

 

By the way, how is it implemented ? By the time commit message reaches JIRA commit is already in git repository. Even if JIRA rejects it - there is no easy way to fix commit message.

0 votes
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2015

As always, it is better to prevent this problem instead of fixing it post-mortem.

Install the Commit Policy Plugin and set up the "commit message must contain issue keys from a JQL query" check for your repos!

You haven't mentioned what Version Control System you are using, but it works with Subversion, Git, Mercurial and Stash. (The manual pages also tell you how to fix a commit message for each of these VCS's before pushing that, if somebody forgot to add the issue key.)

0 votes
Sheral Hewes May 26, 2015

How to edit your previously committed message in GIT.

 

Case 1:  Last Commit Message does not have a ticket

The commit message needs to start with the JIRA ticket# (i.e. DEV-12345).  The commit message can be amended by using the following git command:

  • git commit --amend -m "New commit message"

 

Case 2:  Older Commit Message does not have a ticket

In order to change the message on a previous commit older than the last one, use one of the following ways to update the message:

Execute the git command: 

  • git reset <commit>

This command will move the current branch tip backward to the specified commit, reset the staging area to match, but leave the working directory alone. All changes made since <commit> will reside in the working directory, which lets you re-commit.

Once it is reset, you can amend your commit message using the following git command:

  • git commit --amend -m "New commit message"
0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 26, 2015

You will need to ability to edit previously committed message which works differently on your version control tool (GIT,SVN,etc...)

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events