Closed Bug 1921668 Opened 1 year ago Closed 1 year ago

Inline attachment details button no longer works if attachment is on another bug

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: gregp, Assigned: kohei)

Details

Attachments

(1 file)

Steps to reproduce:

  1. Reference an attachment from another bug using the attachment attachment_id syntax, like in bug 1921665 comment 0
  2. Click [details]

Actual results:
A blank details modal appears

Expected results:
A details modal filled with useful information appears

This is because the JS is using the REST API to fetch all attachments for the current bug and not the bug that the attachment belongs to that is referenced in the comment. This is a corner case that was not covered during the initial review of the attachment modal work. We need to load the attachment over the REST API by the attachment ID and not the bug ID and then display that data. Kohei, as the author, can you take a look at this?

Flags: needinfo?(kohei)

Sure, I’ll check it out.

Assignee: nobody → kohei
Status: NEW → ASSIGNED
Flags: needinfo?(kohei)

It seems the overlay doesn’t work well if the attachment is on another bug.

  • The flags assume the attachment is on the current product and component. It’s tricky to handle a different product and component.
  • A foreign attachment cannot be edited on the overlay because the form only contains CSRF tokens for the attachments on the current bug.

Actually, the details link works when a bug has no attachments and only contains a link to a foreign attachment — it just links to the legacy attachment page without showing the overlay.

So, I need to disable the overlay for foreign attachment links.

Summary: Inline attachment details button no longer works → Inline attachment details button no longer works if attachment is on another bug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: