Bug 12518

Summary: gather_print_notices.pl doesn't respect hold/reserve pickup location
Product: Koha Reporter: Olli-Antti Kivilahti <olli-antti.kivilahti>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Initial commit from our issue tracker.

Description Olli-Antti Kivilahti 2014-07-02 13:49:48 UTC
Created attachment 29441 [details] [review]
Initial commit from our issue tracker.

gather_print_notices.pl gathers HOLD-letters based on the borrowers' homebranch.
Our librarians find it hard to send hold notices for Items present in other branches.

This patch gathers print notices for HOLD-letter_code to the Items' reserves.branchcode (pickup location) instead.

This is achieved by using a customizable regexp in the gather_print_notices-script, which picks the barcode from the letter content.

---------------
-- TEST PLAN --
---------------
0. Have a HOLD-letter template with each Items' barcodes somewhere, for ex.
    Barcode: <<items.barcode>>
1. Create a reservation for a borrower with no other message delivery option than printing. Set the pickup location to other (branch P) than the borrowers homebranch (branch H).
2. Check the item in and confirm reservation. This enques a letter in the message_queue-table.
3. run the gather_print_notices.pl -cronjobs with the following parameters
    gather_print_notices.pl <your_notices_directory> --split --holdbarcode 'Barcode: (\S+)<br />'
You will find the letter generated to the branch P, instead of the branch H if you hadn't used the --holdbarcode -parameter.