https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43603 Bug ID: 43603 Summary: Add batch scan import for article requests (folder/SFTP) Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: jake.deery@openfifth.co.uk, robin@catalyst.net.nz Target Milestone: --- This patch adds a batch import mechanism that automatically completes scanned article requests by polling a configured file transport (local folder, SFTP, or FTP, reusing the existing Koha::File::Transport infrastructure) for zip archives. Each zip archive is expected to contain scanned files plus an idlink.txt (or datalink.txt) mapping file, in the same convention used by tools/picture-upload.pl and tools/upload-cover-image.pl. Each mapped row is matched against a PROCESSING/SCAN Koha::ArticleRequest, the file is registered under Koha's existing Upload feature, and the request is marked completed. This is part 2 of a two-part split of the original bug 20570 ("Add script to complete scanned article requests"), which now covers only the REST API for editing/completing article requests. This bug depends on bug 20570 landing first, since it builds on the REST API work and retires the 2018-era match_scans/search_scans_in_process methods and misc/migration_tools/complete_article_requests.pl script that bug 20570 deliberately left in place. Adds: - Two new tables: article_request_scan_accounts (config, references file_transports) and article_request_scan_log (idempotency tracking) - Koha::ArticleRequestScanAccount(s) and Koha::ArticleRequestScanLog(s) object classes - admin/article_request_scan_accounts.pl, a CRUD page for scan accounts - Koha::ArticleRequest::ScanImport, the zip-unpack-and-match engine - misc/cronjobs/article_request_scans.pl, replacing misc/migration_tools/complete_article_requests.pl Test plan: 1. Apply this patch (depends on bug 20570) 2. Configure a file transport (admin/file_transports.pl) and a scan account (admin/article_request_scan_accounts.pl) referencing it 3. Build a zip containing a scanned file plus an idlink.txt mapping it to a PROCESSING/SCAN article request 4. Run misc/cronjobs/article_request_scans.pl -c -v and confirm the request completes with a working urls value 5. Run the new test suites: prove t/db_dependent/Koha/ArticleRequestScanAccounts.t t/db_dependent/Koha/ArticleRequestScanLogs.t t/db_dependent/Koha/ArticleRequest/ScanImport.t -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.