Bugzilla – Attachment 169900 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: Make item addition dependent on MarcItemFieldsToOrder mappings and introduce MarcFieldsToOrder to cronjob
Bug-34355-Make-item-addition-dependent-on-MarcItem.patch (text/plain), 3.51 KB, created by
Matt Blenkinsop
on 2024-07-31 15:10:40 UTC
(
hide
)
Description:
Bug 34355: Make item addition dependent on MarcItemFieldsToOrder mappings and introduce MarcFieldsToOrder to cronjob
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-31 15:10:40 UTC
Size:
3.51 KB
patch
obsolete
>From 7e8a3d50c05e6b5ec2d7e55172308575f3656d73 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 8 Aug 2023 10:39:10 +0000 >Subject: [PATCH] Bug 34355: Make item addition dependent on > MarcItemFieldsToOrder mappings and introduce MarcFieldsToOrder to cronjob > >--- > Koha/MarcOrder.pm | 24 ++++++++++-------------- > misc/cronjobs/marc_ordering_process.pl | 5 ++++- > 2 files changed, 14 insertions(+), 15 deletions(-) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index 525ae442a64..8373c99c897 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -125,18 +125,15 @@ sub create_order_lines_from_file { > } > ); > >- while ( my $import_record = $import_records->next ) { >- my $result = add_biblio_from_import_record( >- { >- import_batch_id => $import_batch_id, >- import_record => $import_record, >- matcher_id => $params->{matcher_id}, >- overlay_action => $params->{overlay_action}, >- agent => $agent, >- } >- ); >- warn "Duplicates found in $result->{duplicates_in_batch}, record was skipped." >- if $result->{duplicates_in_batch}; >+ while( my $import_record = $import_records->next ){ >+ my $result = add_biblio_from_import_record({ >+ import_batch_id => $import_batch_id, >+ import_record => $import_record, >+ matcher_id => $params->{matcher_id}, >+ overlay_action => $params->{overlay_action}, >+ agent => $agent, >+ }); >+ warn "Duplicates found in $result->{duplicates_in_batch}, record was skipped." if $result->{duplicates_in_batch}; > next if $result->{skip}; > > my $order_line_details = add_items_from_import_record( >@@ -417,7 +414,6 @@ sub _verify_number_of_fields { > $tags_count; # All counts of various fields should be equal if they exist > } > } >- > return { error => 0, count => $tags_count }; > } > >@@ -1214,7 +1210,7 @@ sub _create_item_fields_from_syspref { > push @uris, $infoset->{uri}; > push @copynos, $infoset->{copyno}; > push @budget_codes, $item_budget_id; >- push @itemprices, $infoset->{itemprice}; >+ push @itemprices, $infoset->{price}; > push @replacementprices, $infoset->{replacementprice}; > push @itemcallnumbers, $infoset->{itemcallnumber}; > } >diff --git a/misc/cronjobs/marc_ordering_process.pl b/misc/cronjobs/marc_ordering_process.pl >index 1491fa440d4..301579dcd19 100755 >--- a/misc/cronjobs/marc_ordering_process.pl >+++ b/misc/cronjobs/marc_ordering_process.pl >@@ -98,6 +98,9 @@ foreach my $acct (@accounts) { > opendir my $dir, $working_dir or die "Can't open filepath"; > my @files = grep { /\.(mrc|marcxml|mrk)/i } readdir $dir; > closedir $dir; >+ print "No new files found\n" if scalar(@files) == 0; >+ >+ my $files_processed = 0; > > foreach my $filename (@files) { > my $full_path = "$working_dir/$filename"; >@@ -124,7 +127,7 @@ foreach my $acct (@accounts) { > } > } > } >- print "All files completed\n"; >+ say sprintf "%s files processed", $files_processed unless $files_processed == 0; > print "Moving to next account\n\n"; > } > print "Process complete\n"; >-- >2.39.3 (Apple Git-146)
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 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
|
174363
|
174364
|
174365
|
174366
|
174367
|
174368
|
174369
|
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383