From 64d2e8cc9513a3cc0d2b342a3aee802130816ae9 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 1 May 2023 22:45:55 +0000 Subject: [PATCH] Bug 20844: (follow-up) Fixes for lists, objects, templates, tests --- C4/Circulation.pm | 3 +-- catalogue/moredetail.pl | 2 +- cataloguing/additem.pl | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 90a5430a9d1..5528787af01 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -4026,7 +4026,6 @@ sub LostItem{ } # SendLostHoldNotices - my $item = Koha::Items->find( $itemnumber ); if ( C4::Context->preference('SendLostHoldNotices') && defined $hold && $item->itemlost ){ my $letter = C4::Letters::GetPreparedLetter( module => 'reserves', @@ -4037,7 +4036,7 @@ sub LostItem{ branches => $hold->branchcode, }, ); - C4::Message->enqueue($letter, $hold->borrower->unblessed, 'email'); + C4::Message->enqueue($letter, $hold->borrower, 'email'); } } diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 433d8f915e4..be82fb65703 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -248,7 +248,7 @@ foreach my $item (@items){ ); $item_info->{nomod} = !$patron->can_edit_items_from( $item->homebranch ); - $item_info->{waiting_holds} = $item->{object}->holds({ found => [ 'W', 'T' ], item_level_hold => { '!=' => 0 } })->count; + $item_info->{waiting_holds} = $item->holds({ found => [ 'W', 'T' ], item_level_hold => { '!=' => 0 } })->count; push @item_data, $item_info; } diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 4d8a0bc3363..ba601d133fa 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -750,7 +750,7 @@ if( my $default_location = C4::Context->preference('NewItemsDefaultLocation') ) my @ig = Koha::Biblio::ItemGroups->search({ biblio_id => $biblionumber })->as_list(); if ( C4::Context->preference('RevertLostBibLevelHolds') ){ - my @lostitems = Koha::Items->search({ biblionumber => $biblionumber, itemlost => { '!=' => 0 } }); + my @lostitems = Koha::Items->search({ biblionumber => $biblionumber, itemlost => { '!=' => 0 } })->as_list; # find if any of these lost items have waiting holds my @waitinglostitems; foreach my $lostitem ( @lostitems ){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index b9b3347f954..2654b31c358 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -116,8 +116,8 @@
This item has a waiting item-level hold on it, and has been marked as lost.
- - + +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 975a6245608..70a0d83f7ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -82,10 +82,10 @@