Bugzilla – Attachment 128764 Details for
Bug 9565
Deleting a record should alert or fail if there are current subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9565: Use Koha::Biblio (rebase for 21.05.x)
Bug-9565-Use-KohaBiblio-rebase-for-2105x.patch (text/plain), 2.23 KB, created by
Marion Durand
on 2021-12-20 16:03:23 UTC
(
hide
)
Description:
Bug 9565: Use Koha::Biblio (rebase for 21.05.x)
Filename:
MIME Type:
Creator:
Marion Durand
Created:
2021-12-20 16:03:23 UTC
Size:
2.23 KB
patch
obsolete
>From f56d373f38591f9020bf16361ac9fb6df4022b21 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Dec 2021 14:44:07 +0100 >Subject: [PATCH] Bug 9565: Use Koha::Biblio (rebase for 21.05.x) > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > tools/batch_delete_records.pl | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl >index dbc7cb1e93..c387f98a06 100755 >--- a/tools/batch_delete_records.pl >+++ b/tools/batch_delete_records.pl >@@ -23,10 +23,10 @@ use Modern::Perl; > use CGI; > use List::MoreUtils qw( uniq ); > >-use C4::Auth; >-use C4::Output; >+use C4::Auth qw( get_template_and_user ); >+use C4::Output qw( output_html_with_http_headers ); >+use C4::Biblio qw( GetMarcBiblio ); > use C4::AuthoritiesMarc; >-use C4::Biblio; > use Koha::Virtualshelves; > > use Koha::Authorities; >@@ -87,8 +87,8 @@ if ( $op eq 'form' ) { > for my $record_id ( uniq @record_ids ) { > if ( $recordtype eq 'biblio' ) { > # Retrieve biblio information >- my $biblio = Koha::Biblios->find( $record_id ); >- unless ( $biblio ) { >+ my $biblio_object = Koha::Biblios->find( $record_id ); >+ unless ( $biblio_object ) { > push @messages, { > type => 'warning', > code => 'biblio_not_exists', >@@ -96,12 +96,12 @@ if ( $op eq 'form' ) { > }; > next; > } >- my $holds_count = $biblio->holds->count; >- $biblio = $biblio->unblessed; >+ my $biblio = $biblio_object->unblessed; > my $record = &GetMarcBiblio({ biblionumber => $record_id }); > $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')]; >- $biblio->{holds_count} = $holds_count; >+ $biblio->{holds_count} = $biblio_object->holds->count; > $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); >+ $biblio->{subscriptions_count} = $biblio_object->subscriptions->count; > push @records, $biblio; > } else { > # Retrieve authority information >-- >2.20.1
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 9565
:
113589
|
113591
|
126821
|
126905
|
128051
|
128160
|
128163
|
128164
|
128165
|
128278
|
128279
|
128280
|
128281
|
128764
|
128832