Bug 1257579 - auto-linking issues
Summary: auto-linking issues
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: 5.0
Assignee: Jeff Fearn 🐞
QA Contact: Jeff Fearn 🐞
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-27 11:49 UTC by Tomas Hoger
Modified: 2018-12-09 06:29 UTC (History)
4 users (show)

Fixed In Version: 5.0.4.rh1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-26 03:48:22 UTC
Embargoed:


Attachments (Terms of Use)

Description Tomas Hoger 2015-08-27 11:49:53 UTC
Description of problem:

Bugzilla code to automatically create links for URLs used in bug comments does not correctly handle links to itself.  If URL is show_bug.cgi?id=123#c0, correct link is created.  However, if URL is show_bug.cgi?id=123#h0 instead, BZ treats #h0 as not being part of the URL.  This is specific to links to self, URLs to any other site ending with #h0 are correctly turned to links.

Somewhat related RFE.  Currently, BZ#123 is turned to bug link.  Would it be possible to extend this to cover versions that refer to specific comment or history item, such as BZ#123#c0 and BZ#123#h0.

Comment 1 Tomas Hoger 2015-08-27 11:53:49 UTC
(In reply to Tomas Hoger from comment #0)
> Bugzilla code to automatically create links for URLs used in bug comments
> does not correctly handle links to itself.

Examples:

https://bugzilla.redhat.com/show_bug.cgi?id=1257579#c0
https://bugzilla.redhat.com/show_bug.cgi?id=1257579#h0

but this is ok:

https://partner-bugzilla.redhat.com/show_bug.cgi?id=1257579#h0

> Somewhat related RFE.  Currently, BZ#123 is turned to bug link.  Would it be
> possible to extend this to cover versions that refer to specific comment or
> history item, such as BZ#123#c0 and BZ#123#h0.

BZ#1257579
BZ#1257579#c0
BZ#1257579#h0

or maybe even:

bug 1257579#c0

in addition to currently supported bug 1257579 comment 0.

Is there currently any way to refer to specific history change?  Something like bug 1257579 history 0, given that full URL is not turned to link correctly.

Comment 2 Jason McDonald 2015-08-28 02:38:39 UTC
All of these suggestions appear to be feasible.  These should ideally be fixed in the upstream code.

Comment 3 Jeff Fearn 🐞 2018-03-07 11:39:16 UTC
Note for this I've added '#c' as a comment marker, I have not added special handling for history items as it's extremely complex to do so.

In Bugzilla 5 the full url "https://bugzilla.redhat.com/show_bug.cgi?id=1257579#h0" is linkified properly, as that is a separate feature to the bug_link code.


Note You need to log in before you can comment on or make changes to this bug.