Bugzilla – Attachment 172692 Details for
Bug 30648
Title is lost in holds history when bibliographic record is deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30648: Tidy
Bug-30648-Tidy.patch (text/plain), 3.36 KB, created by
Nick Clemens (kidclamp)
on 2024-10-11 13:13:40 UTC
(
hide
)
Description:
Bug 30648: Tidy
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-10-11 13:13:40 UTC
Size:
3.36 KB
patch
obsolete
>From a34e083095bbbf3d45b8dccc5bd392ddce86cfba Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Oct 2024 13:11:10 +0000 >Subject: [PATCH] Bug 30648: Tidy > >--- > C4/Biblio.pm | 7 ++++--- > installer/data/mysql/atomicupdate/bug_30648.pl | 6 +++--- > t/db_dependent/Biblio.t | 2 +- > t/lib/TestBuilder.pm | 8 ++++---- > 4 files changed, 12 insertions(+), 11 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 1a88d52bdb9..6c62b21311a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -554,12 +554,13 @@ sub DelBiblio { > > # We delete any existing holds > my $holds = $biblio->holds; >- $holds->update({ deleted_biblionumber => $biblionumber }, { no_triggers => 1 }); >+ $holds->update( { deleted_biblionumber => $biblionumber }, { no_triggers => 1 } ); > my $old_holds = $biblio->old_holds; >- $old_holds->update({ deleted_biblionumber => $biblionumber }, { no_triggers => 1 }); >+ $old_holds->update( { deleted_biblionumber => $biblionumber }, { no_triggers => 1 } ); > while ( my $hold = $holds->next ) { >+ > # no need to update the holds queue on each step, we'll do it at the end >- $hold->cancel({ skip_holds_queue => 1 }); >+ $hold->cancel( { skip_holds_queue => 1 } ); > } > > # We update any existing orders >diff --git a/installer/data/mysql/atomicupdate/bug_30648.pl b/installer/data/mysql/atomicupdate/bug_30648.pl >index 32f7b586bba..80d7c842a12 100755 >--- a/installer/data/mysql/atomicupdate/bug_30648.pl >+++ b/installer/data/mysql/atomicupdate/bug_30648.pl >@@ -2,11 +2,11 @@ use Modern::Perl; > use Koha::Installer::Output qw(say_warning say_failure say_success say_info); > > return { >- bug_number => "30648", >+ bug_number => "30648", > description => "Store biblionumber of deleted record in old reserves", >- up => sub { >+ up => sub { > my ($args) = @_; >- my ($dbh, $out) = @$args{qw(dbh out)}; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; > if ( !column_exists( 'reserves', 'deleted_biblionumber' ) ) { > > $dbh->do( >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index 35df97fd0b2..3e3c6d4a1ed 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -697,7 +697,7 @@ subtest 'DelBiblio' => sub { > } > ); > >- C4::Biblio::DelBiblio($biblio->biblionumber); >+ C4::Biblio::DelBiblio( $biblio->biblionumber ); > $old_hold->discard_changes(); > $hold = Koha::Old::Holds->find( $hold->reserve_id ); > ok( $hold, "Hold has been successfully cancelled on deletion of biblio" ); >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 63cfe5d049c..72f2b4c04d6 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -628,13 +628,13 @@ sub _gen_default_values { > opacusercss => q{}, > }, > Reserve => { >- non_priority => 0, >- item_group_id => undef, >+ non_priority => 0, >+ item_group_id => undef, > deleted_biblionumber => undef, > }, > OldReserve => { >- non_priority => 0, >- item_group_id => undef, >+ non_priority => 0, >+ item_group_id => undef, > deleted_biblionumber => undef, > }, > Itemtype => { >-- >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 30648
:
172687
|
172688
|
172689
|
172690
|
172691
|
172692
|
173340
|
173341
|
173342
|
173343
|
173344
|
173345
|
173491
|
173492
|
173493
|
173494
|
173495
|
173496
|
173611