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> |
||
---|---|---|
.. | ||
Acquisition | ||
Biblio | ||
Budgets | ||
Circulation | ||
DataTables | ||
db_dependent | ||
External | ||
Koha/Plugin | ||
lib | ||
Members | ||
Number | ||
Search | ||
Serials | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
Auth_with_shibboleth.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
AuthUtils.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Barcodes_ValueBuilder.t | ||
Biblio.t | ||
Bookseller.t | ||
Boolean.t | ||
Borrower.t | ||
Branch.t | ||
Breeding.t | ||
Budgets.t | ||
Cache.t | ||
Calendar.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Context.t | ||
Contract.t | ||
Creators.t | ||
Dates.t | ||
DateUtils.t | ||
Debug.t | ||
dummy.t | ||
External_Syndetics.t | ||
Form_MessagingPreferences.t | ||
Heading.t | ||
Images.t | ||
ImportBatch.t | ||
Installer_PerlDependencies.t | ||
Installer_PerlModules.t | ||
Installer_pm.t | ||
ItemCirculationAlertPreference.t | ||
ItemType.t | ||
Koha.t | ||
Koha_Email.t | ||
Koha_MetadataRecord.t | ||
Koha_Template_Plugin_Cache.t | ||
Koha_Template_Plugin_Koha.t | ||
Koha_Util_FrameworkPlugin.t | ||
Koha_Util_MARC.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Languages.t | ||
Letters.t | ||
Log.t | ||
Logger.t | ||
Matcher.t | ||
Members_Attributes.t | ||
Members_AttributeTypes.t | ||
Members_Messaging.t | ||
Message.t | ||
NorwegianPatronDB.t | ||
Output.t | ||
Output_JSONStream.t | ||
Overdues.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Layout.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
perlcriticrc | ||
Prices.t | ||
Print.t | ||
QueryParser.t | ||
RecordProcessor.t | ||
Review.t | ||
Ris.t | ||
RotatingCollections.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SIP_Sip.t | ||
smolder_smoke_signal | ||
SMS.t | ||
SocialData.t | ||
Stats.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
TmplToken.t | ||
XSLT.t |