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.
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.