View | Details | Raw Unified | Return to bug 11299
Collapse All | Expand All

(-)a/C4/Biblio.pm (+1 lines)
Lines 491-496 sub LinkBibHeadingsToAuthorities { Link Here
491
    }
491
    }
492
    require C4::Heading;
492
    require C4::Heading;
493
    require C4::AuthoritiesMarc;
493
    require C4::AuthoritiesMarc;
494
494
    $allowrelink = 1 unless defined $allowrelink;
495
    $allowrelink = 1 unless defined $allowrelink;
495
    my $num_headings_changed = 0;
496
    my $num_headings_changed = 0;
496
    foreach my $field ( $bib->fields() ) {
497
    foreach my $field ( $bib->fields() ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt (-1 / +2 lines)
Lines 50-55 Link Here
50
                autolinker_dialog = opener.document.getElementById("autolinker_dialog");
50
                autolinker_dialog = opener.document.getElementById("autolinker_dialog");
51
            }
51
            }
52
            var field_start = whichfield.parentNode.parentNode.parentNode;
52
            var field_start = whichfield.parentNode.parentNode.parentNode;
53
53
            // Sets the good number of form fields for the specified subfield
54
            // Sets the good number of form fields for the specified subfield
54
            // Returns false if the cloning failed
55
            // Returns false if the cloning failed
55
            function SetSubfieldNumber(subfield_name, nb) {
56
            function SetSubfieldNumber(subfield_name, nb) {
Lines 139-145 Link Here
139
                [% ELSE %]
140
                [% ELSE %]
140
                    if(code.value=='9'){
141
                    if(code.value=='9'){
141
                        subfield.value = "[% To.json(authid) | $raw %]";
142
                        subfield.value = "[% To.json(authid) | $raw %]";
142
                        subfield.className = subfield.className.replace("no_matching_authority_field", "matching_authority_field");
143
                        subfield.className = subfield.className.replace(/no_matching_authority_field/, "matching_authority_field");
143
144
144
                        break;
145
                        break;
145
                    }
146
                    }
(-)a/svc/cataloguing/automatic_linker.pl (-10 / +10 lines)
Lines 4-21 Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
6
#
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
7
# Koha is free software; you can redistribute it and/or modify it
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later version.
11
#
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# Koha is distributed in the hope that it will be useful, but
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
(-)a/t/Biblio.t (-1 lines)
Lines 157-160 warnings_like { $ret = UpdateTotalIssues() } Link Here
157
    "UpdateTotalIssues returns carped warnings if biblio record does not exist";
157
    "UpdateTotalIssues returns carped warnings if biblio record does not exist";
158
158
159
ok( !defined $ret, 'UpdateTotalIssues returns carped warning if biblio record does not exist');
159
ok( !defined $ret, 'UpdateTotalIssues returns carped warning if biblio record does not exist');
160
1;
(-)a/t/db_dependent/Biblio.t (-5 / +4 lines)
Lines 740-752 subtest "LinkBibHeadingsToAuthorities record generation tests" => sub { Link Here
740
    );
740
    );
741
741
742
    #Add test for this case using verbose
742
    #Add test for this case using verbose
743
    my ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1);
743
    ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1);
744
    my $details = $results->{details};
744
    my $details = $results->{details};
745
    is( $num_headings_changed, 1, 'We changed the one we passed' );
745
    is( $num_headings_changed, 1, 'We changed the one we passed' );
746
    is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose");
746
    is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose");
747
747
748
    # Now we check the authority record itself
748
    # Now we check the authority record itself
749
    my $authority = GetAuthority($results->{details}->[0]->{authid});
749
    $authority = GetAuthority($results->{details}->[0]->{authid});
750
750
751
    is( $authority->field('150')->as_string(),
751
    is( $authority->field('150')->as_string(),
752
         "Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza",
752
         "Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza",
Lines 773-785 subtest "LinkBibHeadingsToAuthorities record generation tests" => sub { Link Here
773
        "The generated record contains the correct subfields"
773
        "The generated record contains the correct subfields"
774
    );
774
    );
775
775
776
    # The same exemple With verbose
776
    # The same example With verbose
777
    ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1);
777
    ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1);
778
    is( $num_headings_changed, 1, 'We changed the one we passed' );
778
    is( $num_headings_changed, 1, 'We changed the one we passed' );
779
    is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose");
779
    is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose");
780
780
781
    # Now we check the authority record itself
781
    # Now we check the authority record itself
782
    my $authority = GetAuthority($results->{details}->[0]->{authid});
782
    $authority = GetAuthority($results->{details}->[0]->{authid});
783
    is( $authority->field('100')->as_string(),
783
    is( $authority->field('100')->as_string(),
784
         "Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings",
784
         "Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings",
785
         "The generated record contains the correct subfields"
785
         "The generated record contains the correct subfields"
786
- 

Return to bug 11299