https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42404

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 200145
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200145&action=edit
Bug 42404: Add BatchImportCoverImages background job

This patch adds a background job that processes a zip file containing
cover images and an idlink.txt/datalink.txt mapping file. Each line in
the mapping file maps a biblio_id (or item_id) to an image filename.

Features:
- Supports both biblio_id and item_id targets
- Replace mode (deletes existing images before import)
- Uses Archive::Zip instead of system unzip
- Path traversal protection on extracted files
- Reports progress via the background jobs infrastructure

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/BackgroundJob/BatchImportCoverImages.t
=> SUCCESS: Tests pass!
3. Tests cover:
   - enqueue() sets correct job size, status, and queue
   - Single and multiple image imports
   - Replace mode behavior
   - Bad delimiter handling in mapping files
   - Cancelled job is skipped
   - Upload cleanup after processing
4. Sign off :-D

Sponsored-by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to