Bugzilla – Attachment 120560 Details for
Bug 27577
Autolink bibs after generating the biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27577: Autolink biblio after biblionumber is generated
Bug-27577-Autolink-biblio-after-biblionumber-is-ge.patch (text/plain), 2.20 KB, created by
Nick Clemens
on 2021-05-05 18:34:32 UTC
(
hide
)
Description:
Bug 27577: Autolink biblio after biblionumber is generated
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-05-05 18:34:32 UTC
Size:
2.20 KB
patch
obsolete
>From 4cff9f16069d5b71d8814f3f07da58e5d0876167 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 29 Jan 2021 13:33:34 +0000 >Subject: [PATCH] Bug 27577: Autolink biblio after biblionumber is generated > >If BiblioAddsAuthorities and AutoCreateAuthorities are enabled, a new record is auto linked when saving and authorities generated with a 670 field that indicates which record generated the new authority. > >The code to do this is called before the biblionumber is generated, so the variable that adds the biblionumber to the citation is empty > >This patch moves the linking code to after the biblionumber is generated > >To recreate: >1 - Enable BiblioAddsAuthorities and AutoCreateAuthorities >2 - Import or create a new record >3 - Ensure the record has controlled fields that do not have authorities before saving, i.e.: > Add a 650 with "test_bug_27577_01" >4 - Search for the authority record >5 - Note the 670 field does not contain the biblionumber >6 - Apply patch, restart all the things >7 - Repeat 2-4 >8 - Note the 670 now has the biblionumber > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Biblio.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index f6c89f92e8..df72e511be 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -210,10 +210,6 @@ sub AddBiblio { > try { > $schema->txn_do(sub { > >- if (C4::Context->preference('BiblioAddsAuthorities')) { >- BiblioAutoLink( $record, $frameworkcode ); >- } >- > # transform the data into koha-table style data > SetUTF8Flag($record); > my $olddata = TransformMarcToKoha( $record, $frameworkcode ); >@@ -283,6 +279,10 @@ sub AddBiblio { > # update MARC subfield that stores biblioitems.cn_sort > _koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode ); > >+ if (C4::Context->preference('BiblioAddsAuthorities')) { >+ BiblioAutoLink( $record, $frameworkcode ); >+ } >+ > # now add the record > ModBiblioMarc( $record, $biblionumber ) unless $defer_marc_save; > >-- >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 27577
:
116030
|
116851
|
116854
|
120559
| 120560