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

include filename and Git commit ID in JIRA comments

Krishna Pribadi July 30, 2019

Hello, when I commit a change in Git (bitbucket) and include the JIRA ticket number in the commit message with a key and comment, I only see the commit comment in the JIRA Issue comment. However, I would like for the JIRA comment (as seen from the JIRA app) to automatically also include the Git commit ID and filename (with URL to repository) when the commit is made, not just the user comments. Can someone please help me set this up? 

1 answer

0 votes
Krishna Pribadi August 1, 2019

ping... anyone know how to solve this? 

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2019

Hello @Krishna Pribadi,

I'm not sure what exactly do you mean by JIRA Issue comment which, if I understand correctly, refers to a commit in Bitbucket.

So let me clarify your question. Do you mean the Development section in the Jira ticket view, the one that shows related branches, commits and pull requests in a pop-up dialog?

[BBCSYD-1621] Include staff-only flag on comments in issue export - Software Teams JIRA 2019-08-02 02-01-58.png

If so, the commits dialog already contains short commit hash that links to the commit view in Bitbucket.

BBCSYD-1621: 4 unique commits - Software Teams JIRA 2019-08-02 02-05-00.png

I would like for the JIRA comment (as seen from the JIRA app) to automatically also include the Git commit ID and filename (with URL to repository) when the commit is made, not just the user comments.

What did you mean by filename here? Each commit might contain thousands of files, so it is impossible to list them anywhere in Jira.

Hope this helps. Sorry if I got your question wrong.

Cheers,
Daniil

Krishna Pribadi August 1, 2019

I would like to see the commit ID in the JIRA Issue that is cited during the commit. 

By filename, I mean a list of files that were committed (usually it's only a few for us). 

How do I see the "development" section in JIRA ticket view? 

 

file repository version control testing - this is not a real request - .png

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2019

Ok, now I get what you mean.

So this functionality is called Smart commits. I'm not aware of a way to include commit hash in the comment and I'm pretty sure that filenames can't be included either (Jira isn't doing any sort of introspection of the commits).

What I was referring to is called Development tools. If you follow configuration steps development panel will appear on the issues reflecting related branches, commits and pull requests. I believe it's more useful than comments as it provides up-to-date information (like if you rewrite history while working on a feature, a comment left by smart commit wouldn't disappear) as well as deep linking to the related views in Bitbucket.

I believe you're using Jira Cloud but am not 100% sure, however both pages I linked are available for Jira Server too, just switch to it using the dropdown menu in the top right corner.

Hope this helps.

Cheers,
Daniil

Krishna Pribadi August 2, 2019

Thanks for the response.

I am using JIRA Cloud and BitBucket Cloud. 

 

I do have Smart Commits enabled. But I am not 100% sure I have bitbucket connected to JIRA although from the JIRA side I can see the BitBucket repository.  I have this support ticket looking into it (private) https://getsupport.atlassian.com/servicedesk/customer/portal/11/BBS-112931

 

 

 

So, as far as I can tell, from the JIRA side, bitbucket is integrated to my project. However, I cannot see the development panel.  I did follow through all the configuration steps for enabling the Developer Tools. It's noteworthy to mention that the specific JIRA ticket was created before integration of bitbucket. I wonder if this is why I cannot see the development panel? When we make commits from SourceTree, and reference the issue ID, the message will still show up in JIRA comments but that's it. Just no other development information. Also noteworthy, the panel is configured to show the Development Information but its just not there. 

 

Thanks.

Krishna

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events