Bugzilla – Attachment 182808 Details for
Bug 39962
Recalled status does not show properly on staff interface record detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39962: Allocate checkout item to current recalls
Bug-39962-Allocate-checkout-item-to-current-recall.patch (text/plain), 2.65 KB, created by
Aleisha Amohia
on 2025-05-28 03:49:55 UTC
(
hide
)
Description:
Bug 39962: Allocate checkout item to current recalls
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2025-05-28 03:49:55 UTC
Size:
2.65 KB
patch
obsolete
>From 607e322ade2e560d2ac4e602fcbbf44239da5637 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 28 May 2025 03:47:42 +0000 >Subject: [PATCH] Bug 39962: Allocate checkout item to current recalls > >1. Set up a recall before applying both of these patches >2. Apply the first patch and notice that the recall still doesn't show, because it was created before the patch was applied >3. Apply this patch, install database updates and restart services >4. Notice your old recall now shows as requested and was allocated the relevant checkout item > >Sponsored-by: Auckland University of Technology >--- > Koha/Recall.pm | 2 +- > ..._-_allocate_item_id_to_biblevel_recalls.pl | 24 +++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_39962_-_allocate_item_id_to_biblevel_recalls.pl > >diff --git a/Koha/Recall.pm b/Koha/Recall.pm >index 1b25f0a78f8..8a4834d3158 100644 >--- a/Koha/Recall.pm >+++ b/Koha/Recall.pm >@@ -118,7 +118,7 @@ sub checkout { > foreach (@items) { > my $recalls_allowed = Koha::CirculationRules->get_effective_rule( > { >- branchcode => C4::Context->userenv->{'branch'}, >+ branchcode => $self->pickup_library_id, > categorycode => $self->patron->categorycode, > itemtype => $_->effective_itemtype, > rule_name => 'recalls_allowed', >diff --git a/installer/data/mysql/atomicupdate/bug_39962_-_allocate_item_id_to_biblevel_recalls.pl b/installer/data/mysql/atomicupdate/bug_39962_-_allocate_item_id_to_biblevel_recalls.pl >new file mode 100755 >index 00000000000..d1444e443ea >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_39962_-_allocate_item_id_to_biblevel_recalls.pl >@@ -0,0 +1,24 @@ >+use Modern::Perl; >+use Koha::Recalls; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "39962", >+ description => "Recalled status does not show properly on staff interface record detail page", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my @recalls = Koha::Recalls->search( >+ { status => [ 'requested', 'overdue' ], item_id => undef, item_level => 0, completed => 0 } )->as_list; >+ foreach my $r (@recalls) { >+ if ( $r->checkout ) { >+ my $item_id = $r->checkout->itemnumber; >+ $r->update( { item_id => $item_id } ); >+ } >+ } >+ >+ say_success( $out, "Allocated checkout itemnumber to biblio-level recalls" ); >+ }, >+}; >+ >-- >2.39.5
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 39962
:
182807
|
182808
|
182866
|
182867