[Koha-bugs] [Bug 14045] Add specific quotas to on-site checkout

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 27 12:37:00 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14045

Nicolas Legrand <nicolas.legrand at bulac.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39572|0                           |1
        is obsolete|                            |

--- Comment #13 from Nicolas Legrand <nicolas.legrand at bulac.fr> ---
Created attachment 39573
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39573&action=edit
Bug 14045: Add specific quotas to on-site checkouts

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 at bulac.fr>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list