Bugzilla – Attachment 108835 Details for
Bug 11299
Add a button to automatically link authority records in cataloguing (AJAX)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11299: (QA follow-up) Fix tests, spaces, and CSS update
Bug-11299-QA-follow-up-Fix-tests-spaces-and-CSS-up.patch (text/plain), 6.25 KB, created by
Nick Clemens (kidclamp)
on 2020-08-21 16:00:19 UTC
(
hide
)
Description:
Bug 11299: (QA follow-up) Fix tests, spaces, and CSS update
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-08-21 16:00:19 UTC
Size:
6.25 KB
patch
obsolete
>From 5ffde3fa04948e82b96388bfa2dce134e200c2e2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 21 Aug 2020 15:47:08 +0000 >Subject: [PATCH] Bug 11299: (QA follow-up) Fix tests, spaces, and CSS update > >Removed my from variables in test > >Undid stray line deletions > >Undid adding 1; to test file > >Fix CSS replace command > >Update license > >Fix spelling > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Biblio.pm | 1 + > .../modules/authorities/blinddetail-biblio-search.tt | 3 ++- > svc/cataloguing/automatic_linker.pl | 20 ++++++++++---------- > t/Biblio.t | 2 +- > t/db_dependent/Biblio.t | 8 ++++---- > 5 files changed, 18 insertions(+), 16 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 77b3ea5627..e5895caa98 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -491,6 +491,7 @@ sub LinkBibHeadingsToAuthorities { > } > require C4::Heading; > require C4::AuthoritiesMarc; >+ > $allowrelink = 1 unless defined $allowrelink; > my $num_headings_changed = 0; > foreach my $field ( $bib->fields() ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >index ef3cd93917..38d954f5bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >@@ -50,6 +50,7 @@ > autolinker_dialog = opener.document.getElementById("autolinker_dialog"); > } > var field_start = whichfield.parentNode.parentNode.parentNode; >+ > // Sets the good number of form fields for the specified subfield > // Returns false if the cloning failed > function SetSubfieldNumber(subfield_name, nb) { >@@ -139,7 +140,7 @@ > [% ELSE %] > if(code.value=='9'){ > subfield.value = "[% To.json(authid) | $raw %]"; >- subfield.className = subfield.className.replace("no_matching_authority_field", "matching_authority_field"); >+ subfield.className = subfield.className.replace(/no_matching_authority_field/, "matching_authority_field"); > > break; > } >diff --git a/svc/cataloguing/automatic_linker.pl b/svc/cataloguing/automatic_linker.pl >index 711debf92d..62f25073bb 100755 >--- a/svc/cataloguing/automatic_linker.pl >+++ b/svc/cataloguing/automatic_linker.pl >@@ -4,18 +4,18 @@ > # > # This file is part of Koha. > # >-# Koha is free software; you can redistribute it and/or modify it under the >-# terms of the GNU General Public License as published by the Free Software >-# Foundation; either version 3 of the License, or (at your option) any later >-# version. >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. > # >-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >-# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. > # >-# You should have received a copy of the GNU General Public License along >-# with Koha; if not, write to the Free Software Foundation, Inc., >-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; > use CGI; >diff --git a/t/Biblio.t b/t/Biblio.t >index a847edaa97..5596b4bf19 100755 >--- a/t/Biblio.t >+++ b/t/Biblio.t >@@ -157,4 +157,4 @@ warnings_like { $ret = UpdateTotalIssues() } > "UpdateTotalIssues returns carped warnings if biblio record does not exist"; > > ok( !defined $ret, 'UpdateTotalIssues returns carped warning if biblio record does not exist'); >-1; >+ >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index f0c12c9770..a1b2e4fad4 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -740,13 +740,13 @@ subtest "LinkBibHeadingsToAuthorities record generation tests" => sub { > ); > > #Add test for this case using verbose >- my ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); >+ ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); > my $details = $results->{details}; > is( $num_headings_changed, 1, 'We changed the one we passed' ); > is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); > > # Now we check the authority record itself >- my $authority = GetAuthority($results->{details}->[0]->{authid}); >+ $authority = GetAuthority($results->{details}->[0]->{authid}); > > is( $authority->field('150')->as_string(), > "Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza", >@@ -773,13 +773,13 @@ subtest "LinkBibHeadingsToAuthorities record generation tests" => sub { > "The generated record contains the correct subfields" > ); > >- # The same exemple With verbose >+ # The same example With verbose > ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); > is( $num_headings_changed, 1, 'We changed the one we passed' ); > is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); > > # Now we check the authority record itself >- my $authority = GetAuthority($results->{details}->[0]->{authid}); >+ $authority = GetAuthority($results->{details}->[0]->{authid}); > is( $authority->field('100')->as_string(), > "Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings", > "The generated record contains the correct subfields" >-- >2.11.0
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 11299
:
23146
|
26715
|
33074
|
37912
|
37913
|
37972
|
38737
|
39477
|
39478
|
39479
|
40831
|
41229
|
45218
|
56440
|
56508
|
56509
|
58307
|
60998
|
63311
|
63312
|
63313
|
64075
|
67162
|
67708
|
67709
|
67710
|
67712
|
67713
|
67714
|
67824
|
67825
|
67826
|
67827
|
67828
|
67829
|
79385
|
79386
|
79387
|
79388
|
79389
|
79390
|
79391
|
79392
|
79393
|
79394
|
79395
|
79396
|
79397
|
79398
|
79399
|
79447
|
79448
|
79449
|
79450
|
79451
|
79452
|
79545
|
94818
|
95126
|
95152
|
98571
|
98572
|
99249
|
108091
|
108309
|
108310
|
108396
|
108552
|
108834
|
108835
|
109062
|
109063
|
109069
|
109181
|
110553
|
110554
|
110555
|
110556
|
110557
|
110568
|
110569
|
110570
|
110571
|
110572
|
111706
|
111707
|
111708
|
111709
|
111710
|
112125
|
112126
|
112127
|
112128
|
112129
|
112130
|
112131
|
112132
|
112133
|
112134
|
112135
|
113562
|
113563
|
113564
|
113565
|
113566
|
113567
|
113568
|
114803
|
114924
|
114925
|
114926
|
114927
|
114928
|
114929
|
114930
|
114931
|
114932