Closed Bug 1767200 Opened 3 years ago Closed 3 years ago

The file status indicates is not refreshed after the file is deleted through the context menu in the download manager

Categories

(Firefox :: Downloads Panel, defect)

defect

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox100 --- wontfix
firefox101 --- verified
firefox102 --- verified

People

(Reporter: nayinain, Assigned: aminomancer)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached video record.webm (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

  1. Download a file (e.g https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central/Firefox%20Installer.en-US.exe) and wait for the download to complete.
  2. Restart Firefox
  3. Open the Library (Ctrl + J)
  4. Right-click the file and click Delete

Actual results:

Nothing happened.

Expected results:

File should be deleted.

Has STR: --- → yes
Component: Untriaged → Downloads Panel

:nayinain, if you think that's a regression, could you try to find a regression range using for example mozregression?

Correction:

Actual results:

The file has been deleted but the file status indicates has not been updated.

Expected results:

File should be deleted and File moved or missing is displayed under the file name.

Summary: Downloaded file cannot be deleted through the context menu after the browser is restarted → The file status indicates is not refreshed after the file is deleted through the context menu in the download manager

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #1)

:nayinain, if you think that's a regression, could you try to find a regression range using for example mozregression?

This issue has existed since the Delete feature was added, so I don't think this is a regression.

Actually I think it is a regression, from when the delete function was converted from DownloadsCommon into a method on the download prototype object. Since history downloads don't inherit from that prototype it's just referencing a method that doesn't exist. It is my mistake. Thanks for reporting, I will fix this quickly.

Assignee: nobody → shmediaproductions
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Regressed by: 1755570
Version: Firefox 101 → Trunk

My previous patch for bug 1755570 contained an oversight that caused
problems when deleting history downloads' target files. This patch just
adds a minimal data removal method to the history download prototype,
so the DownloadElementShell methods can execute without exceptions.

Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1755570

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c5bb436ae1c9 Fix Delete File on history downloads. r=Gijs

Backed out changeset c5bb436ae1c9 (Bug 1767200) for causing bc failures on browser_downloads_context_menu_delete_file.js.
Backout link
Push with failures <--> bc6
Failure Log

Flags: needinfo?(shmediaproductions)

(In reply to Marian-Vasile Laza from comment #8)

Backed out changeset c5bb436ae1c9 (Bug 1767200) for causing bc failures on browser_downloads_context_menu_delete_file.js.
Backout link
Push with failures <--> bc6
Failure Log

Thanks. Looks like I need to wrap the creationTime reference in trycatch since it throws on Linux instead of being just undefined.

Flags: needinfo?(shmediaproductions)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e38004bd79c0 Fix Delete File on history downloads. r=Gijs

Thanks, I have no idea why moving the registerCleanupFunction call fixes this but it seems to. I guess there is some kind of timing conflict between clearing history at the menu test exit and opening the panel at the keynav test start.

Flags: needinfo?(shmediaproductions)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2eceb51d31bf Fix Delete File on history downloads. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

Comment on attachment 9274732 [details]
Bug 1767200 - Fix Delete File on history downloads. r=mak,Gijs

Beta/Release Uplift Approval Request

  • User impact if declined: Confusion about whether files are deleted
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small-ish JS patch, we still have a bit of beta runway
  • String changes made/needed: Nope
  • Is Android affected?: No
Attachment #9274732 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9274732 [details]
Bug 1767200 - Fix Delete File on history downloads. r=mak,Gijs

Approved for 101.0b7.

Attachment #9274732 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Reproduced the initial issue in release 100 using Windows 10.
Verified - Fixed in the latest Nightly 102.0a1 (2022-05-15) and Beta 101.0b7 using Windows 10, macOS 12 and Ubuntu 20. The downloaded file is successfully deleted and the "File deleted" message is displayed.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: