Bugzilla – Attachment 168512 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.58 KB, created by
Janusz Kaczmarek
on 2024-07-04 19:48:39 UTC
(
hide
)
Description:
Bug 36372: trigger a record indexing when the record source is set
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2024-07-04 19:48:39 UTC
Size:
1.58 KB
patch
obsolete
>From 9433981d63fb2f8f3e7e07d619da397dbd712336 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 > >Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> >--- > 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 ffd141321b..883bf722ee 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.39.2
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