Summary: | File missing warning in Koha::UploadedFile should be for permanent files only | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Tools | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | minor | ||
Priority: | P5 - low | CC: | andrew, david, kyle, m.de.rooy, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This removes the warning from the log files when temporarily uploaded files are deleted and the file no longer exists (for example, when the temporary files are in /tmp directory and the system is rebooted they are deleted).
|
Version(s) released in: |
22.05.00,21.11.03,21.05.11
|
Circulation function: | |||
Attachments: |
Bug 29156: File missing warning in Koha::UploadedFile for permanent files only
Bug 29156: File missing warning in Koha::UploadedFile for permanent files only Bug 29156: File missing warning in Koha::UploadedFile for permanent files only |
Description
Fridolin Somers
2021-10-01 22:59:38 UTC
Created attachment 125645 [details] [review] Bug 29156: File missing warning in Koha::UploadedFile for permanent files only When an uploaded file is deleted, when file does not exist there is a warning : "Removing record for file.txt within category koha_upload, but file was missing." For temporary files, this warning is noisy. For example when they are in /tmp, system reboot deleted them. I propose to remove this warning for temporary files. Test plan : 1) Upload a temporary and a permanent file via Tools > Upload 2) Delete the file on server 3) Delete the two files from Tools > Upload 4) Look at warning in log files => You see only warning for permanent file Please enter assignee, future RM :) Oups, corrected :D Created attachment 128101 [details] [review] Bug 29156: File missing warning in Koha::UploadedFile for permanent files only When an uploaded file is deleted, when file does not exist there is a warning : "Removing record for file.txt within category koha_upload, but file was missing." For temporary files, this warning is noisy. For example when they are in /tmp, system reboot deleted them. I propose to remove this warning for temporary files. Test plan : 1) Upload a temporary and a permanent file via Tools > Upload 2) Delete the file on server 3) Delete the two files from Tools > Upload 4) Look at warning in log files => You see only warning for permanent file Signed-off-by: David Nind <david@davidnind.com> Testing notes using koha-testing-docker (KTD): - Location for temporary files in KTD is /var/lib/koha/kohadev/tmp/koha_kohadev_upload/ - Location for permanent files in KTD is /var/lib/koha/kohadev/uploads/ Created attachment 129597 [details] [review] Bug 29156: File missing warning in Koha::UploadedFile for permanent files only When an uploaded file is deleted, when file does not exist there is a warning : "Removing record for file.txt within category koha_upload, but file was missing." For temporary files, this warning is noisy. For example when they are in /tmp, system reboot deleted them. I propose to remove this warning for temporary files. Test plan : 1) Upload a temporary and a permanent file via Tools > Upload 2) Delete the file on server 3) Delete the two files from Tools > Upload 4) Look at warning in log files => You see only warning for permanent file Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Always good to reduce noise.. this makes sense. Passing QA Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.03 Pushed to 21.05.x for 21.05.11 Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. |