Bugzilla – Attachment 182867 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.69 KB, created by
David Nind
on 2025-05-30 20:51:13 UTC
(
hide
)
Description:
Bug 39962: Allocate checkout item to current recalls
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-30 20:51:13 UTC
Size:
2.69 KB
patch
obsolete
>From 30b2e415fb445fda2179329e1a7c584ba5ba0986 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 >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Recall.pm | 2 +- > ..._-_allocate_item_id_to_biblevel_recalls.pl | 23 +++++++++++++++++++ > 2 files changed, 24 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 1b25f0a78f..8a4834d315 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 0000000000..a2f7d948f1 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_39962_-_allocate_item_id_to_biblevel_recalls.pl >@@ -0,0 +1,23 @@ >+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