Bugzilla – Attachment 80418 Details for
Bug 21365
BiblioAddsAuthorities does not work with the Advanced MARC Editor - Rancor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio
Bug-21365-Call-BiblioAutoLink-from-AddBiblio-and-M.patch (text/plain), 4.24 KB, created by
Michal Denar
on 2018-10-11 19:36:56 UTC
(
hide
)
Description:
Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2018-10-11 19:36:56 UTC
Size:
4.24 KB
patch
obsolete
>From 99d1c4f62cded3ec702ab88397183bfd7942d577 Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Mon, 17 Sep 2018 01:13:55 +0300 >Subject: [PATCH] Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio > >This makes e.g. the advanced MARC editor, and anything that uses AddBiblio or >ModBiblio honor BiblioAddsAuthorities. > >To test: >1. Make sure BiblioAddsAuthorities and AutoCreateAuthorities preferences are enabled. >2. Add a new record using advanced editor (enable EnableAdvancedCatalogingEditor to >use it), include a previously non-existing author. >3. Save the record and observe the author get an authority number. >4. Add another author, save the record and make sure it also gets an authority number. > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > C4/Biblio.pm | 8 ++++++++ > acqui/addorderiso2709.pl | 6 +----- > acqui/neworderempty.pl | 3 --- > cataloguing/addbiblio.pl | 3 --- > 4 files changed, 9 insertions(+), 11 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 0c5a917c6b..3f5531a680 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -234,6 +234,10 @@ sub AddBiblio { > $defer_marc_save = 1; > } > >+ if (C4::Context->preference('BiblioAddsAuthorities')) { >+ BiblioAutoLink( $record, $frameworkcode ); >+ } >+ > my ( $biblionumber, $biblioitemnumber, $error ); > my $dbh = C4::Context->dbh; > >@@ -295,6 +299,10 @@ sub ModBiblio { > logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted ); > } > >+ if (C4::Context->preference('BiblioAddsAuthorities')) { >+ BiblioAutoLink( $record, $frameworkcode ); >+ } >+ > # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to > # throw an exception which probably won't be handled. > foreach my $field ($record->fields()) { >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 91d8321f0c..1921a5af6e 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -163,7 +163,7 @@ if ($op eq ""){ > my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; > my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || ''; > >- # 1st insert the biblio, or find it through matcher >+ # Insert the biblio, or find it through matcher > unless ( $biblionumber ) { > if ($matcher_id) { > if ( $matcher_id eq '_TITLE_AUTHOR_' ) { >@@ -194,10 +194,6 @@ if ($op eq ""){ > } > ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ); > SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); >- # 2nd add authorities if applicable >- if (C4::Context->preference("BiblioAddsAuthorities")){ >- my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'}); >- } > } else { > SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > } >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 0e6f2c14c2..968ceece65 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -164,9 +164,6 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ > exit; > } > #from this point: add a new record >- if (C4::Context->preference("BiblioAddsAuthorities")){ >- my $headings_linked=BiblioAutoLink($marcrecord, $params->{'frameworkcode'}); >- } > my $bibitemnum; > $params->{'frameworkcode'} or $params->{'frameworkcode'} = ""; > ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} ); >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 11c6d38e41..901892936b 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -831,9 +831,6 @@ if ( $op eq "addbiblio" ) { > # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) > if ( !$duplicatebiblionumber or $confirm_not_duplicate ) { > my $oldbibitemnum; >- if (C4::Context->preference("BiblioAddsAuthorities")){ >- BiblioAutoLink( $record, $frameworkcode ); >- } > if ( $is_a_modif ) { > ModBiblio( $record, $biblionumber, $frameworkcode ); > } >-- >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 21365
:
79021
|
79302
|
80325
|
80418
|
80440