Bugzilla – Attachment 173345 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.50 KB, created by
Biblibre Sandboxes
on 2024-10-25 10:55:12 UTC
(
hide
)
Description:
Bug 30648: Tidy
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2024-10-25 10:55:12 UTC
Size:
3.50 KB
patch
obsolete
>From dc538c6414f4c0799eb4debdfa1beba7065e38a3 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Anneli Ãsterman <anneli.osterman@koha-suomi.fi> >--- > 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 1a88d52bdb..6c62b21311 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 32f7b586bb..80d7c842a1 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 35df97fd0b..3e3c6d4a1e 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 63cfe5d049..72f2b4c04d 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