Inline attachment details button no longer works if attachment is on another bug
Categories
(bugzilla.mozilla.org :: General, defect)
Tracking
()
People
(Reporter: gregp, Assigned: kohei)
Details
Attachments
(1 file)
Steps to reproduce:
- Reference an attachment from another bug using the
attachment attachment_id
syntax, like in bug 1921665 comment 0 - Click
[details]
Actual results:
A blank details modal appears
Expected results:
A details modal filled with useful information appears
Comment 1•1 year ago
|
||
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?
Assignee | ||
Comment 2•1 year ago
|
||
Sure, I’ll check it out.
Assignee | ||
Comment 3•1 year ago
|
||
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.
Comment 4•1 year ago
|
||
Comment 5•1 year ago
|
||
Description
•