Bugzilla – Attachment 140837 Details for
Bug 26368
Add support for OCLC Encoding level values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26368: Add OCLC options to marc21_leader.tt
Bug-26368-Add-OCLC-options-to-marc21leadertt.patch (text/plain), 7.12 KB, created by
David Nind
on 2022-09-21 22:38:07 UTC
(
hide
)
Description:
Bug 26368: Add OCLC options to marc21_leader.tt
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-21 22:38:07 UTC
Size:
7.12 KB
patch
obsolete
>From 7d767a3389214899ece0e38edce11d1079b36cc0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 3 Sep 2020 12:52:28 +0000 >Subject: [PATCH] Bug 26368: Add OCLC options to marc21_leader.tt > >See documentation at: >https://www.oclc.org/bibformats/en/fixedfield/elvl.html > >To test: > 1 - Apply patch, updatedatabase > 2 - Edit a record in the basic editor > 3 - Edit the leader using the plugin > 4 - Note the options for '17 - Encoding level' > 5 - Find the system preference 'UseOCLCEncodingLevels' > 6 - Edit the record again > 7 - Note new options I,J,K,M > 8 - Set the value of encodign level to one of the new options and save > 9 - Edit again >10 - Confirm the value is displayed correctly selected >11 - Repeat tests using advanced cataloging editor > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../bug_26368_add_OCLC_encoding_syspref.perl | 15 ++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../en/includes/cateditor-widgets-marc21.inc | 6 +++++ > .../admin/preferences/cataloguing.pref | 6 +++++ > .../value_builder/marc21_leader.tt | 23 +++++++++++++++++++ > 5 files changed, 51 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl b/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl >new file mode 100644 >index 0000000000..8e53efecf2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl >@@ -0,0 +1,15 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "26368", >+ description => "Add OCLC Encoding Levels system preference", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) >+ VALUES ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo') >+ }); >+ say $out "Added UseOCLCEncodingLevels system preference"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 617d34b814..26639555f6 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -760,6 +760,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), > ('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'), > ('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'), >+('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'), > ('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'), > ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), > ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >index 340c2a2487..2876b9b9ee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >@@ -49,6 +49,12 @@ > <option value="5">5 - Partial (preliminary) level</option> > <option value="7">7 - Minimal level</option> > <option value="8">8 - Prepublication level</option> >+ [% IF Koha.Preference('UseOCLCEncodingLevels') %] >+ <option value="I">I- Full-level input by OCLC participants</option> >+ <option value="J">J- Deleted record</option> >+ <option value="K">K- Less-than-full input by OCLC participants</option> >+ <option value="M">M- Added from a batch process</option> >+ [% END %] > <option value="u">u - Unknown</option> > <option value="z">z - Not applicable</option> > </select> >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 5b2cbf8a16..561338684d 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 >@@ -171,6 +171,12 @@ Cataloging: > choices: > biblionumber: generated as biblionumber. > "OFF": not generated automatically. >+ - >+ - Display OCLC defined values for MARC encoding level in leader value builder? >+ - pref: UseOCLCEncodingLevels >+ choices: >+ 1: Yes. >+ 0: No. > Display: > - > - 'Separate main entry and subdivisions with ' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >index e77d2a8537..100725dd06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >@@ -1,4 +1,5 @@ > [% SET footerjs = 1 %] >+[% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] > <title>000 - Leader builder › Cataloging › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -236,6 +237,28 @@ > [% ELSE %] > <option value="8">8- Prepublication level</option> > [% END %] >+ [% IF Koha.Preference('UseOCLCEncodingLevels') %] >+ [% IF ( f17I ) %] >+ <option value="I" selected="selected">I- Full-level input by OCLC participants</option> >+ [% ELSE %] >+ <option value="I">I- Full-level input by OCLC participants</option> >+ [% END %] >+ [% IF ( f17J ) %] >+ <option value="J" selected="selected">J- Deleted record</option> >+ [% ELSE %] >+ <option value="J">J- Deleted record</option> >+ [% END %] >+ [% IF ( f17K ) %] >+ <option value="K" selected="selected">K- Less-than-full input by OCLC participants</option> >+ [% ELSE %] >+ <option value="K">K- Less-than-full input by OCLC participants</option> >+ [% END %] >+ [% IF ( f17K ) %] >+ <option value="M" selected="selected">M- Added from a batch process</option> >+ [% ELSE %] >+ <option value="M">M- Added from a batch process</option> >+ [% END %] >+ [% END %] > [% IF ( f17u ) %] > <option value="u" selected="selected">u - Unknown</option> > [% ELSE %] >-- >2.30.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 26368
:
109622
|
120209
|
140826
|
140837
|
141197
|
141198
|
141199