33

Given an issue in JIRA with multiple comments, is there an easy way to link from one comment to another?

I can use the permalink, but that's a very long and ugly URL. I can also link to e.g. http://jira.example.com/browse/ISSUE-999#action_555213, but that's also rather cumbersome.

Is there a more convenient way? I remember being able to write "#12" in bugzilla to link to comment#12 in a bugzilla issue, but I can't find something similar in Jira.

Erik Forsberg
  • 4,819
  • 3
  • 27
  • 31
  • Not that I know of. Since JIRA comments can be sorted ascending or descending, using an absolute index value might not work as you expect – mdoar Sep 15 '11 at 23:55

8 Answers8

25

AFAICT this is unsupported. This was requested by a (paying?) Jira customer a couple of years ago and was shot down: https://jira.atlassian.com/browse/JRA-19537. More recently this was requested again: https://jira.atlassian.com/browse/JRA-28976 and has yet to be addressed by Atlassian.

For now the best you can do is take mliebelt's advice and use the permalink.

artburkart
  • 1,830
  • 1
  • 20
  • 28
jgibson
  • 1,013
  • 11
  • 9
  • 1
    Quick update, back in October 2012 Atlassian rejected the idea again. – jgibson Jan 31 '13 at 05:42
  • 2
    Current task since end '15 - https://jira.atlassian.com/browse/JRASERVER-44899 - Status "Gathering Interest" – retrovertigo Apr 27 '18 at 01:51
  • Permalink can be obtained by clicking on the date corresponding to a comment. – Abhishek Kumar May 03 '23 at 10:39
  • Abhishek, this isn't just about permalinks; it's about referencing other comments in the same issue by a short URL like `#comment5` or something similar to what Bugzilla offers, `comment 4`: https://bugzilla.readthedocs.io/en/5.0.4/using/tips.html#autolinkification – jgibson May 08 '23 at 21:21
11

Not sure if this is standard, but in the Jira we are using, in the permalink for the comment you want to link to there is a "#comment-NUMBER" part.

When I just used this within the same Jira issue in a comment as a link (e.g. [#comment-NUMBER]), this linked correctly to the other comment without reloading the whole page.

Hope that helps.

user3248573
  • 111
  • 1
  • 2
  • 3
    This sort of works but... not. The link is generated fine. However and as described in JRA-19537, the comment is not highlighted. But worse: with our current layout the page scrolls until the targeted comment is... hidden right under the non-scrollable banner at the top of the page. – MarcH Apr 16 '15 at 05:22
11

Try to add in the comment something like that (hope it works with the wiki syntax here):

This is the text of the comment.
The [comment #5|http://jira.example.com/browse/ISSUE-999#action_555213] bla bla ...
Some more comment.

This is then shown as:

This is the text of the comment. The comment #5 bla bla ... Some more comment.

That should be possible if the wiki syntax is allowed for JIRA. See the documentation at Atlassian. The description and comment field are normally shown with the wiki style renderer, so you can hide the ugly URL under a more readable one.

And yes, it uses an absolute URL because JIRA does not allow anything else. I stick to solutions that work now sometimes, even if they may break in the future ... ;-)

mliebelt
  • 15,345
  • 7
  • 55
  • 92
1

Need to add link to hashtag comment number. So basically for any text, insert link and type hash+comment number link this.

enter image description here

So link will not be full link but only hash+comment number.

Shashank Bhatt
  • 717
  • 1
  • 11
  • 28
1

Tl;dr: find out the comment id attribute and add it prefixed by the "#" symbol to the issue URL. There seems to be no clickable solution right now. Also this solution only semi-works.


Jira comments at the time of writing have an id attribute which contains the comment number. As you may know, you can add an element id attribute as the fragment identifier to jump to it after loading the page.

Hence, URLs like

https://YOUR_JIRA_HOST/browse/ISSUE_NUMBER#COMMENT_ID_ATTRIBUTE

for example

https://myjira.com/browse/Issue-1234#comment-987654

will link to the comment.

From my tests, this only sometimes works. Seems like it's the best option available right now though.

FK82
  • 4,907
  • 4
  • 29
  • 42
0

I just discovered today:

There is the "new Jira issue view" which seems to be active by default at least for recent registrations, it doesn't support links to comments.

But if you deactivate the "new issue view" under your accounts Jira Settings ( https://[subdomain].atlassian.net/secure/ViewPersonalSettings.jspa ) > Jira Labs:

enter image description here

You will get the "old jira issue view" that offers a "Permalink" for every comment.

enter image description here

Those permalinks work for everybody, since it renders the issue in the "old jira issue view" even for people that have the "new Jira issue view" enabled.

The link looks like this: https://[subdomain].atlassian.net/browse/[issueKey]?focusedCommentId=[commentId]&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-[commentId]

karfau
  • 638
  • 4
  • 17
  • 2
    https://jira.atlassian.com/browse/JRACLOUD-70156 (Ability to link to a specific comment when using the new issue view) was "Resolved: 05/May/2020 7:31 PM" having been "Created: 03/Sep/2018 3:45 AM". – Martin Dorey Jun 04 '21 at 21:24
-2

Update: Currently if I just add the title of the issue to the body, it will automatically be converted to a link.

i.e. "This is the body of an issue that relates to SAVE-10139 and needs to be completed"

KraigH
  • 223
  • 3
  • 8
-4

Just using [issueid-nnn] seems to work now (at least in onDemand)