Bugzilla – Attachment 152385 Details for
Bug 33887
Automatic checkin should be able to optionally fill the next hold with the returned item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33887: Add the ability to optionally fill the next hold when an item is automatically checked in.
Bug-33887-Add-the-ability-to-optionally-fill-the-n.patch (text/plain), 7.30 KB, created by
Sam Lau
on 2023-06-15 15:03:37 UTC
(
hide
)
Description:
Bug 33887: Add the ability to optionally fill the next hold when an item is automatically checked in.
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-06-15 15:03:37 UTC
Size:
7.30 KB
patch
obsolete
>From f94194b402fd93a44168d942caf7e0d0bc8e13a3 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Mon, 12 Jun 2023 20:08:55 +0000 >Subject: [PATCH] Bug 33887: Add the ability to optionally fill the next hold > when an item is automatically checked in. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When an item is automatically checked in, Koha should be able to trap that item for the next patron and send a notification to that patron that a hold is waiting for them. > >To test: >1. Apply patches >2. restart_all and updatedatabase >3. Go to administration -> item types and edit an item type >4. Make sure the checkbox that is labeled âAutomatic checkin:â is checked. At the bottom of the page click save changes. >5. In Administration -> system preferences, search for âAutomaticCheckinAutoFillâ and set it to âDoâ. >6. Check out an item to a patron and make it overdue (.ie set due date to yesterday). Also make sure that the item type you are checking out matches the item type edited in step 4. >7. Place a hold on the item. Make the pickup location the same as the library it is checked out from. >8. Run cronjob at misc/cronjobs/automatic_checkin.pl >9. On the item details page, notice that the item was checked in and now the hold is waiting for pickup. >10. Visit the patronâs page who placed the hold. >11. Click on the notices tab and see that there is a âHold available for pickupâ notice. >12. Repeat steps 6-8, but this time make the hold pickup location different than the library the item is currently checked out to. >13. Notice that this time, the item was checked in, the hold is waiting, and the item is in transit to the other library. >14. If you visit the patronâs page, this time there should be no new notice because the item is still in transit. >15. Sign-Off :) >--- > Koha/Checkouts.pm | 3 ++- > installer/data/mysql/atomicupdate/skeleton.pl | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/circulation.pref | 3 ++- > 4 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm >index c6db4562d0..c4bdb4f372 100644 >--- a/Koha/Checkouts.pm >+++ b/Koha/Checkouts.pm >@@ -82,13 +82,14 @@ sub automatic_checkin { > { prefetch => 'item'} > ); > >- my $autofill_next = C4::Context->preference('AutoCheckinAutoFill'); >+ my $autofill_next = C4::Context->preference('AutomaticCheckinAutoFill'); > > while ( my $checkout = $due_checkouts->next ) { > if ( $checkout->item->itemtype->automatic_checkin ) { > my ( undef, $messages) = C4::Circulation::AddReturn($checkout->item->barcode, $checkout->branchcode, undef, dt_from_string($checkout->date_due) ); > my $is_transfer = $checkout->branchcode ne $messages->{ResFound}->{branchcode}; > if ( $autofill_next ){ >+ print("autofill next was selected"); > if ( $messages->{ResFound} ){ > C4::Reserves::ModReserveAffect($checkout->item->itemnumber, $checkout->borrowernumber, $is_transfer, $messages->{ResFound}->{reserve_id}, $checkout->{desk_id}, 0); > if( $is_transfer ){ >diff --git a/installer/data/mysql/atomicupdate/skeleton.pl b/installer/data/mysql/atomicupdate/skeleton.pl >index a420b537f2..50f2be6a07 100755 >--- a/installer/data/mysql/atomicupdate/skeleton.pl >+++ b/installer/data/mysql/atomicupdate/skeleton.pl >@@ -8,9 +8,9 @@ return { > my ($dbh, $out) = @$args{qw(dbh out)}; > # Do you stuffs here > $dbh->do(q{ >- INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AutoCheckinAutoFill', '0', NULL,'Automatically fill the next hold with an automatic checkin cronjob.', 'YesNo'}); >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AutomaticCheckinAutoFill', '0', NULL,'Automatically fill the next hold with an automatic checkin cronjob.', 'YesNo'}); > # Print useful stuff here > # sysprefs >- say $out "Added new system preference 'AutoCheckinAutoFill'"; >+ say $out "Added new system preference 'AutomaticCheckinAutoFill'"; > }, > }; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 2aae161c4b..cd2418009f 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -77,13 +77,13 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AuthorityXSLTResultsDisplay','','','Enable XSL stylesheet control over authority results page display on intranet','Free'), > ('AuthSuccessLog','0',NULL,'If enabled, log successful authentications','YesNo'), > ('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'), >-('AutoCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'), > ('autoControlNumber','OFF','biblionumber|OFF','Used to autogenerate a Control Number: biblionumber will be as biblionumber, OFF will leave the field as it is;','Choice'), > ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), > ('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'), > ('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'), > ('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'), > ('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'), >+('AutomaticCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'), > ('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'), > ('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'), > ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','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 46d68ed50e..d51a97bea1 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 >@@ -978,11 +978,12 @@ Circulation: > holdingbranch: "item's holding library" > - "." > - >- - pref: AutoCheckinAutoFill >+ - pref: AutomaticCheckinAutoFill > choices: > 1: "Do" > 0: "Don't" > - allow holds to be automatically filled after being automatically checked in. >+ - '<br><strong>NOTE:</strong> These system preferences require the <code>misc/cronjobs/automatic_checkin.pl</code> cronjob. Ask your system administrator to schedule it.<br>' > Patron restrictions: > - > - pref: PatronRestrictionTypes >-- >2.30.2
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 33887
:
152279
|
152280
|
152385
|
152388
|
152391
|
152392
|
152494
|
154862
|
154863
|
154864
|
157594
|
157595
|
157596
|
157597