Bug 39234 - Set default upload category
Summary: Set default upload category
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 11:06 UTC by Lari Taskula
Modified: 2025-03-04 12:52 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2025-03-04 11:06:14 UTC
Uploaded files are considered temporary and will be removed by cleanup_database.pl unless an authorised value from category UPLOAD is provided.

By default, Koha sets empty category meaning the uploaded file is considered a temporary upload.

Add a system preference to define an upload category to be selected by default.
Comment 1 Lari Taskula 2025-03-04 11:10:11 UTC
Since not everyone likes adding yet another system preference, one option would be to select the most used category by default.

Btw by selecting I mean values for the "Category" dropdown under Tools -> Upload (requires at least one authorised_value under UPLOAD category to display the dropdown)
Comment 2 Lari Taskula 2025-03-04 11:47:04 UTC
Adding a few notes,

> will be removed by cleanup_database.pl unless an authorised value from category UPLOAD is provided.
cleanup_database.pl only removes temporary files if system preference "UploadPurgeTemporaryFilesDays" is set.

> By default, Koha sets empty category meaning the uploaded file is considered a temporary upload.
Technically Koha only looks at uploaded_files.permanent flag for temporary file deletion.