Bugzilla – Attachment 168339 Details for
Bug 36372
Allow privileged users to set the 'record source' on cataloguing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36372: trigger a record indexing when the record source is set
Bug-36372-trigger-a-record-indexing-when-the-recor.patch (text/plain), 1.53 KB, created by
Arthur Suzuki
on 2024-07-02 09:43:40 UTC
(
hide
)
Description:
Bug 36372: trigger a record indexing when the record source is set
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2024-07-02 09:43:40 UTC
Size:
1.53 KB
patch
obsolete
>From 521b04984999815b544f363424aeec532d6987e5 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Tue, 4 Jun 2024 11:49:38 +0200 >Subject: [PATCH] Bug 36372: trigger a record indexing when the record source > is set > >--- > cataloguing/record_source.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/record_source.pl b/cataloguing/record_source.pl >index ffd141321bf..883bf722eee 100644 >--- a/cataloguing/record_source.pl >+++ b/cataloguing/record_source.pl >@@ -28,19 +28,23 @@ use C4::Context; > use Koha::DateUtils qw( dt_from_string ); > use Koha::Biblios; > use Koha::RecordSources; >+use Koha::SearchEngine; >+use Koha::SearchEngine::Indexer; > use URI::Escape qw( uri_escape_utf8 ); > > # ======================== > # MAIN > #========================= > my $input = CGI->new; >-my $biblionumber = $input->param('biblionumber'); # if biblionumber exists, it's a modif, not a new biblio. >+my $biblionumber = $input->param('biblionumber'); > my $record_source_id = $input->param('record_source_id') // ''; > my $save = $input->param('save') // ''; > >-if ($save ne '') { >+if ($save) { > my $biblio = Koha::Biblios->find($biblionumber); > $biblio->metadata->set({record_source_id => $record_source_id})->store; >+ my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >+ $indexer->index_records( $biblionumber, "specialUpdate", "biblioserver" ); > print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); > } > >-- >2.45.1
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 36372
:
166161
|
168054
|
168195
|
168338
|
168339
|
168340
|
168430
|
168510
|
168511
|
168512
|
168897
|
168898
|
168899
|
168900
|
168902
|
169268
|
169269
|
169270
|
169271
|
169542
|
169831
|
172369
|
172370
|
172371