Bugzilla – Attachment 4975 Details for
Bug 6713
marc import not matching
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6713, editing matching rules broken
Bug-6713-editing-matching-rules-broken.patch (text/plain), 14.39 KB, created by
Chris Cormack
on 2011-08-11 22:25:35 UTC
(
hide
)
Description:
Bug 6713, editing matching rules broken
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-08-11 22:25:35 UTC
Size:
14.39 KB
patch
obsolete
>From be17cb44bfd7f694b624267526af395e9e16faae Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri, 12 Aug 2011 10:23:59 +1200 >Subject: [PATCH] Bug 6713, editing matching rules broken > >Was a template error, but also a bug that had been in there for a >while fixed too > >Please test by editing a matching rule, match sure no new match checks >are added, and that the matchpoint components survive. > >Then try importing some marc records using that match rule >--- > admin/matching-rules.pl | 2 +- > .../prog/en/modules/admin/matching-rules.tt | 98 ++++++++++---------- > 2 files changed, 50 insertions(+), 50 deletions(-) > >diff --git a/admin/matching-rules.pl b/admin/matching-rules.pl >index 63e5a3f..e992899 100755 >--- a/admin/matching-rules.pl >+++ b/admin/matching-rules.pl >@@ -126,7 +126,7 @@ sub add_update_matching_rule { > > # match checks > my @mc_nums = sort map { /^mc_(\d+)_id/ ? int($1): () } $input->param; >- foreach my $mc_num (@mp_nums) { >+ foreach my $mc_num (@mc_nums) { > # source components > my $src_components = []; > my @src_comp_nums = sort map { /^mc_${mc_num}_src_c_(\d+)_tag/ ? int($1): () } $input->param; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >index 9b1be24..1c0a009 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >@@ -250,42 +250,42 @@ function CheckRuleForm(f) { > </li> > </ol> > [% FOREACH component IN matchpoint.components %] >- <fieldset class="rows" id="mp_[% component.mp_num %]_c_[% component.comp_num %]"> >+ <fieldset class="rows" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]"> > <legend>Matchpoint components</legend> > <ol> > <li> >- <label for="mp_[% component.mp_num %]_c_[% component.comp_num %]_tag">Tag: </label> >- <input type="text" id="mp_[% component.mp_num %]_c_[% component.comp_num %]_tag" >- name="mp_[% component.mp_num %]_c_[% component.comp_num %]_tag" >+ <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag">Tag: </label> >+ <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag" >+ name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag" > value="[% component.tag |html %]" > size="3" maxlength="3" /> > </li> > <li> >- <label for="mp_[% component.mp_num %]_c_[% component.comp_num %]_subfields">Subfields: </label> >- <input type="text" id="mp_[% component.mp_num %]_c_[% component.comp_num %]_subfields" >- name="mp_[% component.mp_num %]_c_[% component.comp_num %]_subfields" >+ <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields">Subfields: </label> >+ <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields" >+ name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields" > value="[% component.subfields |html %]" > size="10" maxlength="40" /> > </li> > <li> >- <label for="mp_[% component.mp_num %]_c_[% component.comp_num %]_offset">Offset: </label> >- <input type="text" id="mp_[% component.mp_num %]_c_[% component.comp_num %]_offset" >- name="mp_[% component.mp_num %]_c_[% component.comp_num %]_offset" >+ <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset">Offset: </label> >+ <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset" >+ name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset" > value="[% component.offset |html %]" > size="5" maxlength="5" /> > </li> > <li> >- <label for="mp_[% component.mp_num %]_c_[% component.comp_num %]_length">Length: </label> >- <input type="text" id="mp_[% component.mp_num %]_c_[% component.comp_num %]_length" >- name="mp_[% component.mp_num %]_c_[% component.comp_num %]_length" >+ <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length">Length: </label> >+ <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length" >+ name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length" > value="[% component.length |html %]" > size="5" maxlength="5" /> > </li> > [% FOREACH norm IN component.norms %] >- <li id="mp_[% norm.mp_num %]_c_[% norm.comp_num %]_n_[% norm.norm_num %]"> >- <label for="mp_[% norm.mp_num %]_c_[% norm.comp_num %]_n__[% norm.norm_num %]_norm">Normalization rule: </label> >- <input type="text" id="mp_[% norm.mp_num %]_c_[% norm.comp_num %]_n__[% norm.norm_num %]_norm" >- name="mp_[% norm.mp_num %]_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm" >+ <li id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n_[% norm.norm_num %]"> >+ <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n__[% norm.norm_num %]_norm">Normalization rule: </label> >+ <input type="text" id="mp_[% norm.mp_num %]_c_[% component.comp_num %]_n__[% norm.norm_num %]_norm" >+ name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n_[% norm.norm_num %]_norm" > value="[% norm.norm |html %]" > size="20" maxlength="50" /> > </li> >@@ -362,37 +362,37 @@ function CheckRuleForm(f) { > <ol> > <li> > <label for="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_tag">Tag: </label> >- <input type="text" id="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_tag" >- name="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_tag" >+ <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_tag" >+ name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_tag" > value="[% src_component.tag |html %]" > size="3" maxlength="3" /> > </li> > <li> >- <label for="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_subfields">Subfields: </label> >- <input type="text" id="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_subfields" >- name="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_subfields" >+ <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields">Subfields: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields" >+ name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields" > value="[% src_component.subfields |html %]" > size="10" maxlength="40" /> > </li> > <li> >- <label for="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_offset">Offset: </label> >- <input type="text" id="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_offset" >- name="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_offset" >+ <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset">Offset: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset" >+ name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset" > value="[% src_component.offset |html %]" > size="5" maxlength="5" /> > </li> > <li> >- <label for="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_length">Length: </label> >- <input type="text" id="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_length" >- name="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_length" >+ <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length">Length: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length" >+ name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length" > value="[% src_component.length |html %]" > size="5" maxlength="5" /> > </li> > [% FOREACH norm IN src_component.norms %] >- <li id="mc_[% norm.mc_num %]_src_c_[% norm.comp_num %]_n_[% norm.norm_num %]"> >- <label for="mc_[% norm.mc_num %]_src_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >- <input type="text" id="mc_[% norm.mc_num %]_src_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm" >- name="mc_[% norm.mc_num %]_src_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm" >+ <li id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]"> >+ <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]_norm" >+ name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]_norm" > value="[% norm.norm |html %]" > size="20" maxlength="50" /> > </li> >@@ -401,42 +401,42 @@ function CheckRuleForm(f) { > </fieldset> > [% END %] > [% FOREACH tgt_component IN matchcheck.tgt_components %] >- <fieldset class="rows" id="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]"> >+ <fieldset class="rows" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]"> > <legend>Target (database) record check field</legend> > <ol> > <li> >- <label for="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag">Tag: </label> >- <input type="text" id="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag" >- name="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag" >+ <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag">Tag: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag" >+ name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag" > value="[% tgt_component.tag |html %]" > size="3" maxlength="3" /> > </li> > <li> >- <label for="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields">Subfields: </label> >- <input type="text" id="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields" >- name="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields" >+ <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields">Subfields: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields" >+ name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields" > value="[% tgt_component.subfields |html %]" > size="10" maxlength="40" /> > </li> > <li> >- <label for="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset">Offset: </label> >- <input type="text" id="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset" >- name="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset" >+ <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset">Offset: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset" >+ name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset" > value="[% tgt_component.offset |html %]" > size="5" maxlength="5" /> > </li> > <li> >- <label for="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length">Length: </label> >- <input type="text" id="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length" >- name="mc_[% tgt_component.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length" >+ <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length">Length: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length" >+ name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length" > value="[% tgt_component.length |html %]" > size="5" maxlength="5" /> > </li> > [% FOREACH norm IN tgt_component.norms %] >- <li id="mc_[% norm.mc_num %]_tgt_c_[% norm.comp_num %]_n_[% norm.norm_num %]"> >- <label for="mc_[% norm.mc_num %]_tgt_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >- <input type="text" id="mc_[% norm.mc_num %]_tgt_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm" >- name="mc_[% norm.mc_num %]_tgt_c_[% norm.comp_num %]_n_[% norm.norm_num %]_norm" >+ <li id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]"> >+ <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label> >+ <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]_norm" >+ name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]_norm" > value="[% norm.norm |html %]" > size="20" maxlength="50" /> > </li> >-- >1.7.4.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 6713
:
4975
|
5791
|
6321
|
7510
|
7511