Bugzilla – Attachment 157489 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: fix atomic update and system preference type
Bug-18138-fix-atomic-update-and-system-preference-.patch (text/plain), 4.54 KB, created by
Phil Ringnalda
on 2023-10-20 04:30:40 UTC
(
hide
)
Description:
Bug 18138: fix atomic update and system preference type
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2023-10-20 04:30:40 UTC
Size:
4.54 KB
patch
obsolete
>From 395849753c4a8de1f009beef0ad9c10de28df507 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <glasklas@gmail.com> >Date: Wed, 22 Sep 2021 18:42:07 +0200 >Subject: [PATCH] Bug 18138: fix atomic update and system preference type > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > admin/preferences.pl | 2 +- > ...it-biblio-marc-modification-template-syspref.pl | 14 ++++++++++++++ > ...t-biblio-marc-modification-template-syspref.sql | 1 - > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > 4 files changed, 16 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.pl > delete mode 100644 installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 72ff94e2d7..4a34652f5b 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -114,7 +114,7 @@ sub _get_chunk { > $options{'choices'} = { map { $_->authorised_value => $_->lib } Koha::AuthorisedValues->search( { category => $options{'source'} } )->as_list }; > $add_blank = 1; > } >- } elsif ( $options{choices} eq 'modification-templates' ) { >+ } elsif ( $options{choices} eq 'marcModTemplates' ) { > $options{choices} = { map { $_->template_id => $_->name } Koha::MarcModificationTemplates->search }; > $add_blank = 1; > } else { >diff --git a/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.pl b/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.pl >new file mode 100644 >index 0000000000..6fd8b901d7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "18138", >+ description => "Add system preference", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ # Do you stuffs here >+ $dbh->do(q{INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('SaveBiblioMarcModificationTemplate', '', NULL, 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'marcModTemplates')}); >+ # Print useful stuff here >+ say $out "System preference added"; >+ }, >+} >diff --git a/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql b/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql >deleted file mode 100644 >index e9b564a55a..0000000000 >--- a/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql >+++ /dev/null >@@ -1 +0,0 @@ >-INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('SaveBiblioMarcModificationTemplate', '', NULL, 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'modification-templates'); >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 7c204af22a..d2ca6739be 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -649,7 +649,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), > ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'), >-('SaveBiblioMarcModificationTemplate', '', NULL, 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'modification-templates'), >+('SaveBiblioMarcModificationTemplate', '', NULL, 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'marcModTemplates'), > ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), > ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), > ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'), >-- >2.40.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 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