Bugzilla – Attachment 123125 Details for
Bug 18138
Use MARC modification template when adding/updating bibliographic records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18138: (follow-up) Adjust the system preference editor to allow choosing a modification template
Bug-18138-follow-up-Adjust-the-system-preference-e.patch (text/plain), 2.55 KB, created by
David Gustafsson
on 2021-07-23 14:40:00 UTC
(
hide
)
Description:
Bug 18138: (follow-up) Adjust the system preference editor to allow choosing a modification template
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2021-07-23 14:40:00 UTC
Size:
2.55 KB
patch
obsolete
>From 662445eca36b50dd30f3f72c91803cf6f81d2bdb Mon Sep 17 00:00:00 2001 >From: David Gustafsson <glasklas@gmail.com> >Date: Fri, 23 Jul 2021 16:37:22 +0200 >Subject: [PATCH] Bug 18138: (follow-up) Adjust the system preference editor to > allow choosing a modification template > >Rather than expecting the librarian to add an ID or a name we should provide a dropdown > >To test: >1 - Apply all patches >2 - Search for sytem preference 'SaveBiblioMarcModificationTemplate' >3 - Note it list all defined Marc modification templates >4 - Select one >5 - confirm value in DB is the template id > >Works fine for me > >Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> >--- > admin/preferences.pl | 4 ++++ > .../prog/en/modules/admin/preferences/cataloguing.pref | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 49d06ad996..f31a533b15 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -28,6 +28,7 @@ use C4::ClassSource qw( GetClassSources GetClassSource ); > use C4::Output qw( output_html_with_http_headers ); > use C4::Templates; > use Koha::Acquisition::Currencies; >+use Koha::MarcModificationTemplates; > use IO::File; > use YAML::XS; > use Encode; >@@ -103,6 +104,9 @@ sub _get_chunk { > } elsif ( $options{choices} eq 'patron-categories' ) { > $options{choices} = { map { $_->categorycode => $_->description } Koha::Patron::Categories->search }; > $add_blank = 1; >+ } elsif ( $options{choices} eq 'marc-modification-templates' ) { >+ $options{choices} = { map { $_->template_id => $_->name } Koha::MarcModificationTemplates->search }; >+ $add_blank = 1; > } else { > die 'Unrecognized source of preference values: ' . $options{'choices'}; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index 550bf5569f..d236f712fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -161,7 +161,7 @@ Cataloging: > - > - Apply the MARC modification template with name > - pref: SaveBiblioMarcModificationTemplate >- class: short >+ class: marc-modification-templates > - on records saved using the staff client simple MARC editor, advanced editor or HTTP API. > Display: > - >-- >2.20.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 18138
:
61442
|
61443
|
61734
|
82783
|
86617
|
110266
|
110269
|
110270
|
110272
|
118439
|
118440
|
118441
|
118442
|
118443
|
118444
|
118824
|
120709
|
123125
|
123127
|
123128
|
123129
|
123130
|
123131
|
123132
|
123133
|
123137
|
124466
|
124467
|
124468
|
124469
|
124470
|
124471
|
124472
|
124473
|
124474
|
124475
|
124476
|
124477
|
124478
|
124484
|
124485
|
124486
|
124492
|
124493
|
124991
|
125157
|
148004
|
148005
|
148006
|
148007
|
148008
|
148009
|
157183
|
157184
|
157185
|
157186
|
157187
|
157188
|
157189
|
157190
|
157485
|
157486
|
157487
|
157488
|
157489
|
157490
|
157491
|
158414
|
158415
|
158416
|
158417
|
158418
|
158419
|
158420
|
158421
|
162612
|
162613