Bugzilla – Attachment 22401 Details for
Bug 8015
Add MARC Modifications Templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8015: QA Followup 2
Bug-8015-QA-Followup-2.patch (text/plain), 5.07 KB, created by
Kyle M Hall (khall)
on 2013-10-25 13:32:52 UTC
(
hide
)
Description:
Bug 8015: QA Followup 2
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-10-25 13:32:52 UTC
Size:
5.07 KB
patch
obsolete
>From e947ebf3006aca3db40e8ffb5956565685019097 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 22 Oct 2013 14:24:36 -0400 >Subject: [PATCH] Bug 8015: QA Followup 2 > >--- > .../modules/tools/marc_modification_templates.tt | 10 +++- > tools/marc_modification_templates.pl | 77 ++++++++------------ > 2 files changed, 41 insertions(+), 46 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >index 899dec1..569b7f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >@@ -257,6 +257,12 @@ function setSelectByValue( selectId, value ) { > <div id="yui-main"> > <div class="yui-b"> > <h2>MARC modification templates</h2> >+ >+ [% IF error %] >+ [% IF error == 'no_from_field' %] >+ <div class="dialog message">Error: no field value specified.</div> >+ [% END %] >+ [% END %] > > [% IF ( TemplatesLoop ) %] > >@@ -355,7 +361,9 @@ function setSelectByValue( selectId, value ) { > [% IF ( ActionsLoo.conditional_comparison_equals ) %] matches [% END %] > [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] does not match [% END %] > >- [% IF ( ActionsLoo.conditional_regex ) %] RegEx m/[% END %]<strong>[% ActionsLoo.conditional_value %]/</strong> >+ [% IF ( ActionsLoo.conditional_regex ) %] RegEx m/[% END %] >+ <strong>[% ActionsLoo.conditional_value %]</strong> >+ [% IF ( ActionsLoo.conditional_regex ) %]/[% END %] > [% END %] > </td> > <td>[% ActionsLoo.description %]</td> >diff --git a/tools/marc_modification_templates.pl b/tools/marc_modification_templates.pl >index f9c3ee1..4f9323f 100755 >--- a/tools/marc_modification_templates.pl >+++ b/tools/marc_modification_templates.pl >@@ -67,53 +67,40 @@ if ( $op eq "create_template" ) { > my $conditional_subfield = $cgi->param('conditional_subfield'); > my $conditional_comparison = $cgi->param('conditional_comparison'); > my $conditional_value = $cgi->param('conditional_value'); >- my $conditional_regex = $cgi->param('conditional_regex') eq 'on'; >+ my $conditional_regex = ( $cgi->param('conditional_regex') eq 'on' ) ? 1 : 0; > my $description = $cgi->param('description'); > >- unless ( $mmta_id ) { >- AddModificationTemplateAction( >- $template_id, >- $action, >- $field_number, >- $from_field, >- $from_subfield, >- $field_value, >- $to_field, >- $to_subfield, >- $to_regex_search, >- $to_regex_replace, >- $to_regex_modifiers, >- $conditional, >- $conditional_field, >- $conditional_subfield, >- $conditional_comparison, >- $conditional_value, >- $conditional_regex, >- $description >- ); >- } else { >- ModModificationTemplateAction( >- $mmta_id, >- $action, >- $field_number, >- $from_field, >- $from_subfield, >- $field_value, >- $to_field, >- $to_subfield, >- $to_regex_search, >- $to_regex_replace, >- $to_regex_modifiers, >- $conditional, >- $conditional_field, >- $conditional_subfield, >- $conditional_comparison, >- $conditional_value, >- $conditional_regex, >- $description >- ); >- >- } >+ if ($from_field) { >+ unless ($mmta_id) { >+ AddModificationTemplateAction( >+ $template_id, $action, >+ $field_number, $from_field, >+ $from_subfield, $field_value, >+ $to_field, $to_subfield, >+ $to_regex_search, $to_regex_replace, >+ $to_regex_modifiers, $conditional, >+ $conditional_field, $conditional_subfield, >+ $conditional_comparison, $conditional_value, >+ $conditional_regex, $description >+ ); >+ } >+ else { >+ ModModificationTemplateAction( >+ $mmta_id, $action, >+ $field_number, $from_field, >+ $from_subfield, $field_value, >+ $to_field, $to_subfield, >+ $to_regex_search, $to_regex_replace, >+ $to_regex_modifiers, $conditional, >+ $conditional_field, $conditional_subfield, >+ $conditional_comparison, $conditional_value, >+ $conditional_regex, $description >+ ); >+ } >+ } >+ else { >+ $template->param( error => 'no_from_field' ); >+ } > > } elsif ( $op eq "delete_action" ) { > DelModificationTemplateAction( $cgi->param('mmta_id') ); >-- >1.7.2.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 8015
:
9313
|
9329
|
9330
|
9331
|
10089
|
11579
|
11607
|
11608
|
12280
|
12288
|
12569
|
12570
|
12571
|
12572
|
12839
|
12856
|
12857
|
12858
|
12859
|
12860
|
13121
|
13138
|
13495
|
14030
|
14031
|
14032
|
14033
|
14034
|
14035
|
14040
|
16330
|
16331
|
16332
|
16333
|
16334
|
16335
|
16363
|
16376
|
16377
|
16378
|
16379
|
16413
|
16415
|
16423
|
16455
|
16468
|
16470
|
16471
|
16472
|
16473
|
16475
|
16476
|
16477
|
16478
|
16479
|
16480
|
17036
|
17037
|
17038
|
18372
|
18441
|
21024
|
21025
|
21026
|
21027
|
21028
|
21029
|
21030
|
21031
|
21032
|
21033
|
21034
|
21035
|
21036
|
21037
|
21038
|
21371
|
21484
|
21485
|
21486
|
21487
|
21808
|
21809
|
21876
|
21901
|
21902
|
21903
|
21904
|
21905
|
21906
|
21907
|
21908
|
21909
|
21910
|
21911
|
21912
|
21913
|
21914
|
21915
|
21916
|
21917
|
21918
|
21919
|
21920
|
22185
|
22186
|
22187
|
22188
|
22189
|
22190
|
22284
|
22285
|
22290
|
22293
|
22392
|
22393
|
22394
|
22395
|
22396
|
22397
|
22398
|
22399
|
22400
| 22401