Bugzilla – Attachment 140680 Details for
Bug 31569
Remove GetImportsRecordRange from acqui/addorderiso2709
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31569: Remove GetImportRecordsRange from list step
Bug-31569-Remove-GetImportRecordsRange-from-list-s.patch (text/plain), 2.54 KB, created by
ByWater Sandboxes
on 2022-09-15 15:01:25 UTC
(
hide
)
Description:
Bug 31569: Remove GetImportRecordsRange from list step
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-09-15 15:01:25 UTC
Size:
2.54 KB
patch
obsolete
>From f29bf94129ef9df4222290b3874d6b9d7bcc9fab Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 15 Sep 2022 13:47:07 +0000 >Subject: [PATCH] Bug 31569: Remove GetImportRecordsRange from list step > >This patch removes the use of GetImportRecordsRange from the step >of listing import batches to choose. It was only used for a count so is a simple >replacement > >To test: >1 - Stage a number of files for import >2 - Import one of the files from tools >3 - Add to basket form a staged file >4 - Confirm staged baskets are listed, and imported basket is not > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > acqui/addorderiso2709.pl | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 712c63fc24..a235ca162a 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -30,7 +30,7 @@ use Encode; > use C4::Context; > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >-use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); >+use C4::ImportBatch qw( GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); > use C4::Matcher; > use C4::Search qw( FindDuplicate ); > use C4::Biblio qw( >@@ -417,8 +417,11 @@ sub import_batches_list { > foreach my $batch (@$batches) { > if ( $batch->{'import_status'} =~ /^staged$|^reverted$/ && $batch->{'record_type'} eq 'biblio') { > # check if there is at least 1 line still staged >- my $stagedList=GetImportRecordsRange($batch->{'import_batch_id'}, undef, 1, $batch->{import_status}, { order_by_direction => 'ASC' }); >- if (scalar @$stagedList) { >+ my $import_records_count = Koha::Import::Records->search({ >+ import_batch_id => $batch->{'import_batch_id'}, >+ status => $batch->{import_status} >+ })->count; >+ if ( $import_records_count ) { > push @list, { > import_batch_id => $batch->{'import_batch_id'}, > num_records => $batch->{'num_records'}, >-- >2.30.2
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 31569
:
140659
|
140660
|
140661
|
140662
|
140663
|
140664
|
140665
|
140676
|
140677
|
140678
|
140679
|
140680
|
140681
|
140682
|
141504
|
141505
|
141506
|
141507
|
141508
|
141509
|
141510
|
141511
|
142031