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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,561
Community Members
 
Community Events
176
Community Groups

Is it possible to set JIRA tickets within source code comments instead of commit messages ?

I know its possible to link a commit message to a JIRA ticket, but what I would like to do is add the ticket information into my source code and when someone does a review, or just looking at the code on bitbucket, can see what ticket that section of code satisfies or fixes. 

This is going a bit beyond just adding the text of the ticket, because it doesn't visually stand out and is not clickable, both of which would be ideal.

Possible ?

2 answers

If you are willing to browse source in VSCode instead of Bitbucket, linking from source to Jira using the issue key can be done by the Atlassian VSCode extension with Issue Hovers enabled.

I am not aware of anything that links from Jira to all occurrences of the issue key in source code. Bidirectional tracing would be very useful, especially for those of us (ab)using Jira as a requirements tracker. If anyone knows a better way than instantly-rotting-URLs-to-line-numbers, please let me know.

In the meantime, I created JRASERVER-73917 to potentially address this.

Hello,

You can add a JIRA issue key in one of the following places, and the issue key will become a link to this JIRA ticket:

  • in a comment in the source code of a file while looking at a certain commit
  • in a comment in the source code of a file in a certain Pull Request of the repo

I'm afraid that this is not possible while viewing the source code from the 'Source' page of the repo, as it is not possible at the moment to add comments there. We do have a feature request for being able to add comments in the 'Source' browser as well:

something that would allow users to reference JIRA tickets in there as well.

If you'd be interested in that feature, you can add your vote (by selecting the *Vote for this issue* link), as the number of votes helps the development team and product managers better understand the demand for new features. You can also add yourself as a watcher (by selecting the *Start watching this issue* link) if you'd like to get notified via email on updates.

Please note though that we don't provide ETAs and implementation of new features is done as per our policy here

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events