Bugzilla – Attachment 168054 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-reco.patch (text/plain), 1.31 KB, created by
Arthur Suzuki
on 2024-06-25 11:45:01 UTC
(
hide
)
Description:
Bug 36372 : trigger a record indexing when the record source is set
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2024-06-25 11:45:01 UTC
Size:
1.31 KB
patch
obsolete
>From ab55fb962117365b3ca796e48d2327b3a88d8c74 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 | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/record_source.pl b/cataloguing/record_source.pl >index 5a499299126..6e365cdb3fb 100644 >--- a/cataloguing/record_source.pl >+++ b/cataloguing/record_source.pl >@@ -28,6 +28,8 @@ 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 ); > > # ======================== >@@ -40,8 +42,10 @@ my $save = $input->param('save') // ''; > my $biblio = Koha::Biblios->find($biblionumber); > my $current_source = $biblio->metadata->record_source; > >-if ($save ne '') { >+if ($save) { > $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
|
176743
|
176744