Bugzilla – Attachment 18102 Details for
Bug 10230
Match points do not work with authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10230: Don't limit valid matches to bibs
Bug-10230-Dont-limit-valid-matches-to-bibs.patch (text/plain), 1.93 KB, created by
Jared Camins-Esakov
on 2013-05-12 20:26:46 UTC
(
hide
)
Description:
Bug 10230: Don't limit valid matches to bibs
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2013-05-12 20:26:46 UTC
Size:
1.93 KB
patch
obsolete
>From a28449f3ae2fc8f40a2ebac5abb8f83ff0cae333 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 11 May 2013 15:19:58 -0400 >Subject: [PATCH] Bug 10230: Don't limit valid matches to bibs > >The patch for bug 9523 added a JOIN to the biblio table when identifying >the best match so that if a matched record had been deleted it would >not hold up the import process. Unfortunately, this broke all authority >matching, since of course authorities don't appear in the biblio table. >This patch adds a join to auth_header as well, and decides which to >check based on the record type. >--- > C4/ImportBatch.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index a5befe6..3ce5c67 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -1036,8 +1036,12 @@ sub GetBestRecordMatch { > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare("SELECT candidate_match_id > FROM import_record_matches >- JOIN biblio ON ( candidate_match_id = biblionumber ) >- WHERE import_record_id = ? >+ JOIN import_records ON ( import_record_matches.import_record_id = import_records.import_record_id ) >+ LEFT JOIN biblio ON ( candidate_match_id = biblio.biblionumber ) >+ LEFT JOIN auth_header ON ( candidate_match_id = auth_header.authid ) >+ WHERE import_record_matches.import_record_id = ? AND >+ ( (import_records.record_type = 'biblio' AND biblio.biblionumber IS NOT NULL) OR >+ (import_records.record_type = 'auth' AND auth_header.authid IS NOT NULL) ) > ORDER BY score DESC, candidate_match_id DESC"); > $sth->execute($import_record_id); > my ($record_id) = $sth->fetchrow_array(); >-- >1.7.9.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 10230
:
18101
|
18102
|
18103
|
18231
|
18232
|
18233