Closed Bug 1041508 Opened 10 years ago Closed 10 years ago

include bug id in URL of attachments

Categories

(Bugzilla :: Attachments & Requests, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 148562

People

(Reporter: eblake, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140611060104

Steps to reproduce:

Quoting from the Fedora test list:

On 07/18/2014 09:45 AM, Adam Williamson wrote:> On Thu, 2014-07-17 at 20:53 -0400, Felix Miata wrote:
>> On 2014-07-17 20:41 (GMT-0400) Adam Williamson composed:
>>
>>>> https://bugzilla.redhat.com/attachment.cgi?id=918676
>>
>>> What bug is this attached to? Bugzilla does not provide a backtrack from
>>> an attachment to a bug report, infuriatingly.
>>
>> A convenient link to click, you're right, it has none. But there is a way. 
>> Simply append &action=edit to the attachment URL and you will get a page that 
>> provides a link to the bug it's attached to.
> 
> Hah, nice workaround, I should've thought of that. thanks.

Steps to Reproduce:
1. click on the attachment of any bug
2. using just that URL, try to get back to the bug


Actual results:

Unless you know the '&action=edit' trick, there is no easy way to get from a raw attachment link back to the bug it is tied to.


Expected results:

It would be nice if the URLs generated for attachment pages included a parameter describing the bug id the attachment belongs to.

Obviously, the lookup engine should still hit the right attachment without the bugid addon present in the URL, so existing attachment URLs still work; and in the case of a user (intentionally?) mismatching an attachment id vs. bug id, it's probably better to take the user to the right attachment (that is, have the bug id parameter ignored on input, generated on output).

I'm NOT asking that the attachment page itself change content, only that the URL to the page optionally allow additional information, and that all cases where bugzilla generates the URL to an attachment page, it generates the long URL.  That is, I'm proposing that:

https://bugzilla.redhat.com/attachment.cgi?id=918676

and

https://bugzilla.redhat.com/attachment.cgi?id=918676&bug=1120283

both redirect to the same attachment page, where the page itself does not change contents.

When I proposed this to the Red Hat bugzilla instance (https://bugzilla.redhat.com/show_bug.cgi?id=1121214), I was requested to forward it here; and was offered the following feedback:

That's probably doable from a technical point of view, though there are some corner-cases that will need some thought (like what happens if the attachment id refers to a private attachment that the user cannot see, what happens if the bug id doesn't match the attachment, and what happens if someone adds other parameters to the URL).

In any case, this is a request that ideally should go to the upstream Bugzilla project rather than Red Hat Bugzilla, as there's nothing Red Hat or Fedora-specific in the problem or the suggested solution (i.e. Fedora folks would also have the same problem with links to attachments in any other Bugzilla instance).
until bugzilla supports this, a feature which works right now is setting the "attachment base".
this can be used in conjunction with a wildcard dns entry to generate urls which contain the bug-id.

eg.  the urls generated here are look like https://bug640579.bugzilla.mozilla.org/attachment.cgi?id=643948
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.