Bug 12556: Add new "in processing" state to holds
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Wed, 22 Jul 2020 15:45:36 +0000 (18:45 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 14 Oct 2020 12:50:07 +0000 (14:50 +0200)
commit0e1d291b14d4ea85ff101296e6c633fce22eb120
tree7a3d92c927f5e73a9a48da4d01cd151e7119d2eb
parent9d76149118b3340ced055bf1b436f458589598f8
Bug 12556: Add new "in processing" state to holds

This adds new syspref, HoldsNeedProcessingSIP, which controls whether
a hold that is related to item will be filled automatically or not. If
the user has enabled the syspref then instead of fulfilling the hold
automatically the hold will go to "in processing" state.

To test:
 1. Checkout a book to patron A
 2. Place a bib level hold to the book for B
 3. Patron A returns the book via SIP, to simulate this use:
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item <ItemBarcode> -m checkin
 4. Notice that no notification is generated for Patron B about hold
    and that the hold status in intranet and opac is "In Processing".
 5. Notice that patron A (or other patrons) cannot checkout a book
    that is in processing, because it is considered to be attached to
    the holdee (similarly to the waiting state):
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --patron <PatronABarcode> --item <ItemBarcode> -m checkout

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
14 files changed:
C4/Reserves.pm
C4/RotatingCollections.pm
C4/SIP/ILS/Item.pm
C4/SIP/ILS/Transaction/Checkout.pm
Koha/Hold.pm
circ/returns.pl
installer/data/mysql/atomicupdate/bug_12556.perl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
reserve/request.pl
t/db_dependent/Hold.t