Bugzilla – Attachment 51441 Details for
Bug 16493
acq matching on title and author
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16493 - acq matching on title and author
Bug-16493---acq-matching-on-title-and-author.patch (text/plain), 5.92 KB, created by
Nicole C. Engard
on 2016-05-11 14:45:44 UTC
(
hide
)
Description:
Bug 16493 - acq matching on title and author
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2016-05-11 14:45:44 UTC
Size:
5.92 KB
patch
obsolete
>From ece3a4ee5b6ac8affa111b753c087f119402e552 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 11 May 2016 14:19:41 +0000 >Subject: [PATCH] Bug 16493 - acq matching on title and author > >When you order from a staged file you're getting duplicate warnings that >are inaccurate. For example, when you order a file of 50 DVDs for >example and they don't have ISBNs they're matching on the books. And >then you have to order them one by one. > >This patch replaces the use of FindDuplicates with Koha's match point >system. This means you can select from the same match points defined >and used in the batch record importer, or you can opt to skip matching >altogether! > >Test Plan: >1) Import a record with a title, isbn and author. >2) Delete the from the record and stage it again >3) Attempt to add it to a basket via the staged record >4) You should note the gives you the "No records imported" message >5) Apply this patch >6) Create a matcher for ISBN >7) Create a matcher for Author/Title >8) Attempt to add the record to your basket using the ISBN matcher >8) Koha should find no match and import the record to the basket >9) Stage the record again >10) Attempt to add the record to your basket using the Title/Author matcher >11) You should recieve the "No records imported" message. > >Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov> > >Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> >--- > acqui/addorderiso2709.pl | 11 +++++-- > .../prog/en/modules/acqui/addorderiso2709.tt | 35 +++++++++++++++++++--- > 2 files changed, 40 insertions(+), 6 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 552754c..3b79e49 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -31,7 +31,6 @@ use C4::Auth; > use C4::Output; > use C4::ImportBatch; > use C4::Matcher; >-use C4::Search qw/FindDuplicate/; > use C4::Acquisition; > use C4::Biblio; > use C4::Items; >@@ -141,6 +140,7 @@ if ($op eq ""){ > my @discount = $input->multi_param('discount'); > my @sort1 = $input->multi_param('sort1'); > my @sort2 = $input->multi_param('sort2'); >+ my $matcher_id = $input->multi_param('matcher_id'); > my $active_currency = Koha::Acquisition::Currencies->get_active; > for my $biblio (@$biblios){ > # Check if this import_record_id was selected >@@ -158,7 +158,14 @@ if ($op eq ""){ > > # 1st insert the biblio, or find it through matcher > unless ( $biblionumber ) { >- $duplinbatch=$import_batch_id and next if FindDuplicate($marcrecord); >+ if ($matcher_id) { >+ my $matcher = C4::Matcher->fetch($matcher_id); >+ my @matches = $matcher->get_matches( $marcrecord, my $max_matches = 1 ); >+ if ( @matches ) { >+ $duplinbatch = $import_batch_id; >+ next; >+ } >+ } > # add the biblio > my $bibitemnum; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index c7b04cf..63425a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -189,10 +189,37 @@ > </ul> > > <div id="records_to_import"> >- <span class="checkall"><a id="checkAll" href="#">Check all</a></span> >- <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span> >- <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label> >- <input type="checkbox" id="showallbudgets" /> >+ <div id="searchheader"> >+ <div> >+ <span class="checkall"><a id="checkAll" href="#">Select all</a></span> >+ | >+ <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span> >+ | >+ <span> >+ <label for="matcher_id">Matching:</label> >+ <select name="matcher_id" id="matcher_id"> >+ <option value="">Do not look for matching records</option> >+ [% FOREACH available_matcher IN available_matchers %] >+ [% IF ( available_matcher.code == current_matcher_code ) %] >+ <option value="[% available_matcher.matcher_id %]" selected="selected"> >+ [% available_matcher.code %] ([% available_matcher.description %]) >+ </option> >+ [% ELSE %] >+ <option value="[% available_matcher.matcher_id %]"> >+ [% available_matcher.code %] ([% available_matcher.description %]) >+ </option> >+ [% END %] >+ [% END %] >+ </select> >+ </span> >+ | >+ <span> >+ <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label> >+ <input type="checkbox" id="showallbudgets" /> >+ </span> >+ </div> >+ </div> >+ > <input type="hidden" name="op" value="import_records"/> > <input type="hidden" name="basketno" value="[% basketno %]" /> > <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >-- >2.1.4
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 16493
:
51439
|
51441
|
52181
|
52182
|
52903
|
52904
|
57139
|
57140
|
57198
|
57199