Bugzilla – Attachment 178592 Details for
Bug 38924
Introduce an organization level loan 'Quota' system for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38924: Add AllowQuotaOverride and UseGuarantorQuota preferences
Bug-38924-Add-AllowQuotaOverride-and-UseGuarantorQ.patch (text/plain), 4.58 KB, created by
Martin Renvoize (ashimema)
on 2025-02-24 16:29:39 UTC
(
hide
)
Description:
Bug 38924: Add AllowQuotaOverride and UseGuarantorQuota preferences
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-24 16:29:39 UTC
Size:
4.58 KB
patch
obsolete
>From 5aa0c1d4724acd37860611827f196c5cc084590b Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacobomara901@gmail.com> >Date: Fri, 31 Jan 2025 15:03:46 +0000 >Subject: [PATCH] Bug 38924: Add AllowQuotaOverride and UseGuarantorQuota > preferences > >Add a system preferences to allow/dissallow quota overflow at checkout >and enable/disable the use of guarantor quotas against guarantees >--- > .../mysql/atomicupdate/bug_38924-patron_quotas.pl | 11 ++++++++++- > installer/data/mysql/mandatory/sysprefs.sql | 2 ++ > .../en/modules/admin/preferences/circulation.pref | 12 ++++++++++++ > 3 files changed, 24 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl b/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >index 161f3d1511b..53a6a174a19 100755 >--- a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >+++ b/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >@@ -3,7 +3,7 @@ use Koha::Installer::Output qw(say_warning say_success say_info); > > return { > bug_number => "38924", >- description => "Add patron quota and quota_usage tables and permissions", >+ description => "Add patron quota and quota_usage tables, permissions and system preferences for quotas", > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; >@@ -58,5 +58,14 @@ return { > } else { > say_info( $out, "Patron quota usage table already exists" ); > } >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) >+ VALUES >+ ('AllowQuotaOverride', '0', NULL, 'Allow staff to override and check out items to patrons who have exceeded their quota limit', 'YesNo'), >+ ('UseGuarantorQuota', '0', NULL, 'Use guarantor quota instead of guarantee quota when checking out items', 'YesNo') >+ }); >+ >+ say_success( $out, "Patron quota preferences added successfully" ); > }, > }; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 682b9fb950b..ff68b902b2e 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -44,6 +44,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to their guarantor', 'YesNo'), > ('AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set fines to be visible to their guarantor', 'YesNo'), > ('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'), >+('AllowQuotaOverride','0','Allow staff to override and check out items to patrons who have exceeded their quota limit','','YesNo'), >+('UseGuarantorQuota','0','Use guarantor quota instead of guarantee quota when checking out items if one exists and has enough quota available','','YesNo'), > ('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'), > ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), > ('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 7192181ea4e..d54d6aa09bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -389,6 +389,18 @@ Circulation: > 1: Allow > 0: "Don't allow" > - staff to check out an item with age restriction. >+ - >+ - pref: AllowQuotaOverride >+ choices: >+ 1: "Allow" >+ 0: "Don't allow" >+ - staff to check out items to patrons who have exceeded their quota limit. >+ - >+ - pref: UseGuarantorQuota >+ choices: >+ 1: "Use" >+ 0: "Don't use" >+ - guarantor's quota instead of guarantee's quota when checking out items if guarantor has an active quota and quota has enough availability. > - > - Prevent patrons from checking out items if they have more than > - pref: noissuescharge >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38924
:
178582
|
178583
|
178584
|
178585
|
178586
|
178587
|
178588
|
178589
|
178590
|
178591
| 178592 |
178593
|
178594
|
178595
|
178596
|
178597
|
178598
|
178599
|
178600
|
178601
|
178602
|
178603
|
178604
|
178605
|
178606
|
178607
|
178608