Bugzilla – Attachment 188234 Details for
Bug 21272
MARC import should warn about mis-matched branch during staged import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21272: (follow-up) fix error 500 when there is no title
Bug-21272-follow-up-fix-error-500-when-there-is-no.patch (text/plain), 2.51 KB, created by
Hammat wele
on 2025-10-21 16:07:16 UTC
(
hide
)
Description:
Bug 21272: (follow-up) fix error 500 when there is no title
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-10-21 16:07:16 UTC
Size:
2.51 KB
patch
obsolete
>From 52168e68909139418c28647d003ecd0e033bcea2 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 21 Oct 2025 16:05:15 +0000 >Subject: [PATCH] Bug 21272: (follow-up) fix error 500 when there is no title > >To test: >1. Import the record 1record_bz21272.mrc >2. Create a record matching rule to check 001 > 2.1. Go to Administration > Record matching rules > 2.2. Click "New record matching rule" > 2.3. Fill out the form > - Matching rule code: 001 > - Description: Control number (001) > - Match threshold: 1000 > - Record type: Bibliographic records > - Match point 1: > - Search index: control-number > - Score: 1000 > - Matchpoint components: > - Tag: 001 > 2.3. Click "Save" >3. Import the item using the staff interface > 3.1. Go to Cataloging > Stage records for import > 3.2. Choose the file 1item_bz21272.mrc > 3.3. Click "Upload file" > 3.4. Set these field > - Record matching rule: 001 (Control number (001)) > - Action if matching record found: Ignore incoming record (its items may still be processed) > - Action if no match is found: Ignore incoming record > 3.4. Click "Stage for import" > 3.5. Click "View batch" > ==> Error 500 >4. Apply the path >5. Refresh the page or repeat step 3 > ==> There is no Error >--- > C4/ImportBatch.pm | 2 +- > tools/manage-marc-import.pl | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index c54c8f893ac..886a288d27d 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -1382,7 +1382,7 @@ sub GetTitleImportRecord { > $record->[0]->{'encoding'} > ); > $sth->finish(); >- my $title = $marc_record->field('245')->subfield('a'); >+ my $title = $marc_record->subfield( 245, 'a' ); > return $title; > } > >diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl >index 58c55111682..c07d79f100a 100755 >--- a/tools/manage-marc-import.pl >+++ b/tools/manage-marc-import.pl >@@ -100,8 +100,8 @@ if ( $op eq "" ) { > my @bad_item_titles; > my @missing_branches; > foreach my $item (@import_items) { >- push @bad_item_titles, $item->{title}; >- push @missing_branches, $item->{branch}; >+ push @bad_item_titles, $item->{title} if ( $item->{title} ); >+ push @missing_branches, $item->{branch} if ( $item->{title} ); > } > @bad_item_titles = uniq @bad_item_titles; > @missing_branches = uniq @missing_branches; >-- >2.34.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 21272
:
155038
|
155039
|
155043
|
155523
|
155524
|
155525
|
158683
|
163646
|
163648
|
164143
|
164147
|
164148
|
164149
|
178921
|
178922
|
178923
|
178924
|
178925
|
178926
|
178927
|
178928
|
179837
|
179838
|
179839
|
179840
|
179841
|
179842
|
179843
|
179844
|
180383
|
180534
|
180535
|
180536
|
180537
|
180538
|
180539
|
180540
|
180541
|
180542
|
185334
|
185335
|
186389
|
186390
|
187929
|
187930
| 188234