4d8489efba
This patch set adds the ability to defined independent quotas for on-site checkouts. This will be done using the circulation rules matrix where a new column “Current on-site checkouts allow” will be added. This feature is going to use the same method as the existing fields maxissueqty ("Current checkouts allowed"), the new fields will be added to the different tables (see the "DB changes" patch) and will be named maxonsiteissueqty (for consistency). In order to keep the existing behavior and to let more flexibility, a new system preference is added (ConsiderOnSiteCheckoutsAsNormalCheckouts). This syspref will let the liberty to the library to decide if an on-site checkout should be considered as a "normal" checkout or not. To keep the existing behavior, the syspref will be disabled (i.e. an on-site checkout is considered as a normal checkout) and the number of on-site checkouts will be the same as the number of checkout (maxissueqty == maxonsiteissueqty). Technically: There are only very few tests for the Circulation module, and the 2 subroutines impacted by this patch set were not tested at all. It is necessary to introduce non-regression tests for this area. The 2 subroutines are: C4::Circulation::GetBranchBorrowerCircRule and C4::Circulation::TooMany (only called by C4::Circulation::CanBookBeIssued, so we will take the liberty to change the prototype to raise a better warning to the end user). Test plan: I. Confirm there is no regression and the existing behavior is kept 0/ Let the syspref disabled 1/ Set a rule to limit to 2 the number of checkouts allowed 2/ Do a normal checkout 3/ Do an on-site checkout 4/ Try to checkout (on-site or normal) an item again. You should not be allowed. II. Test the new feature - pref disabled 0/ Let the syspref disabled 1/ Set a rule to limit to 2 the number of checkouts allowed and to 1 the number of on-site checkouts allowed. 2/ Do an on-site checkout 3/ Try to do another one, you should not be allowed to do it. 4/ A normal checkout should pass successfully Note that it does not make sense to have the number of on-site checkouts alowed > number of checkouts allowed. III. Test the new feature - pref enabled 0/ Enable the syspref Now an on-site checkout is *not* counted as a normal checkout. This means you can have the number of on-site checkouts > number of checkouts allowed. 1/ Set the values you want for the 2 types of checkouts (normal vs on-site). 2/ Even if a patron has reached the maximum of checkouts allowed, he will be allowed to do a on-site checkout (vice versa). IV. Stress the developper Using the different configurations available in the circulation matrix, try to find one where the checkout is allowed and not should be. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
add_message.pl | ||
bookcount.pl | ||
branchoverdues.pl | ||
branchtransfers.pl | ||
circulation-home.pl | ||
circulation.pl | ||
del_message.pl | ||
hold-transfer-slip.pl | ||
offline-mf.pl | ||
offline.pl | ||
on-site_checkouts.pl | ||
overdue.pl | ||
pendingreserves.pl | ||
renew.pl | ||
reserveratios.pl | ||
returns.pl | ||
selectbranchprinter.pl | ||
stats.pl | ||
transfer-slip.pl | ||
transferstoreceive.pl | ||
view_holdsqueue.pl | ||
waitingreserves.pl | ||
ypattrodue-attr-search-authvalue.pl | ||
ysearch.pl |