Browse Source
It's possible to set a limit on the maximum number of holds for a particular branch/category/itemtype, but not on the total number of holds for a given patron (by branch/category). This new rule works in conjunction with the existing branch/borrower/item rules in that Koha will use the lower of the two limits. This new rule counts all holds of all types, which prevents bib-level holds from not being counted for the purpose of these limits. This makes the most sense and was also requested by the sponsor. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Go to the circ rules editor, note the new max holds rules by patron category in the "Checkout limit by patron category". ( Should we rename this section? ) 4) Create find a patron that is allowed to place a hold, count the number of holds that patron has. Lets make that number 'X'. 5) Set the new max holds rule to X for "All libraries" 6) Note the patron can no longer place another hold 7) Set the new max holds rule to X + 1 for the patron's home library 8) Note the patron can again place another hold 9) Set the new max holds rule to X for the patron's home library 10) Note the patron can no longer place another hold Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>18.11.x
6 changed files with 140 additions and 15 deletions
@ -0,0 +1,18 @@ |
|||
$DBversion = 'XXX'; # will be replaced by the RM |
|||
if( CheckVersion( $DBversion ) ) { |
|||
|
|||
if( !column_exists( 'branch_borrower_circ_rules', 'max_holds' ) ) { |
|||
$dbh->do(q{ |
|||
ALTER TABLE branch_borrower_circ_rules ADD COLUMN max_holds INT(4) NULL DEFAULT NULL AFTER maxonsiteissueqty |
|||
}); |
|||
} |
|||
|
|||
if( !column_exists( 'default_borrower_circ_rules', 'max_holds' ) ) { |
|||
$dbh->do(q{ |
|||
ALTER TABLE default_borrower_circ_rules ADD COLUMN max_holds INT(4) NULL DEFAULT NULL AFTER maxonsiteissueqty |
|||
}); |
|||
} |
|||
|
|||
SetVersion( $DBversion ); |
|||
print "Upgrade to $DBversion done (Bug 15524 - Set limit on maximum possible holds per patron by category)\n"; |
|||
} |
Loading…
Reference in new issue