Bugzilla – Attachment 162352 Details for
Bug 36153
Increase allowed length of authorized value descriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36153: Increase allowed length of authorized value descriptions to 400 chars
Bug-36153-Increase-allowed-length-of-authorized-va.patch (text/plain), 5.94 KB, created by
Aleisha Amohia
on 2024-02-22 22:26:06 UTC
(
hide
)
Description:
Bug 36153: Increase allowed length of authorized value descriptions to 400 chars
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-02-22 22:26:06 UTC
Size:
5.94 KB
patch
obsolete
>From 13b64e491b2b8e42fa3fec88f48d0ec3a4efa292 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 22 Feb 2024 22:21:46 +0000 >Subject: [PATCH] Bug 36153: Increase allowed length of authorized value > descriptions to 400 chars > >Sometimes 200 characters is not enough for a description. This patch increases the maximum length for authorized value descriptions to 400 characters > >To test: >1) Install database updates and restart services. You may need to rebuild schema files. >2) Go to Koha Administration -> Authorized values. >3) Choose an authorised value category and go to add a new value to it >4) Confirm the Description fields for both the OPAC and staff interface will allow you to input and save descriptions that are over 200 characters, up to 400 characters > >Sponsored-by: Education Services Australia SCIS >--- > ...se_authorised_value_description_lengths.pl | 30 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 +-- > .../en/modules/admin/authorised_values.tt | 6 ++-- > 3 files changed, 35 insertions(+), 5 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_36153_-_increase_authorised_value_description_lengths.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36153_-_increase_authorised_value_description_lengths.pl b/installer/data/mysql/atomicupdate/bug_36153_-_increase_authorised_value_description_lengths.pl >new file mode 100755 >index 00000000000..58671125572 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36153_-_increase_authorised_value_description_lengths.pl >@@ -0,0 +1,30 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "36153", >+ description => "Increase allowed length of authorized value descriptions", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( column_exists( 'authorised_values', 'lib' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE authorised_values MODIFY COLUMN `lib` varchar(400) DEFAULT NULL COMMENT 'authorized value description as printed in the staff interface' >+ } >+ ); >+ >+ say $out "Increase length of 'authorised_values.lib' to 400 characters"; >+ } >+ >+ if ( column_exists( 'authorised_values', 'lib_opac' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE authorised_values MODIFY COLUMN `lib_opac` varchar(400) DEFAULT NULL COMMENT 'authorized value description as printed in the OPAC' >+ } >+ ); >+ >+ say $out "Increase length of 'authorised_values.lib_opac' to 400 characters"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 16310f0f449..8ede0bac171 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1023,8 +1023,8 @@ CREATE TABLE `authorised_values` ( > `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key, used to identify the authorized value', > `category` varchar(32) NOT NULL DEFAULT '' COMMENT 'key used to identify the authorized value category', > `authorised_value` varchar(80) NOT NULL DEFAULT '' COMMENT 'code use to identify the authorized value', >- `lib` varchar(200) DEFAULT NULL COMMENT 'authorized value description as printed in the staff interface', >- `lib_opac` varchar(200) DEFAULT NULL COMMENT 'authorized value description as printed in the OPAC', >+ `lib` varchar(400) DEFAULT NULL COMMENT 'authorized value description as printed in the staff interface', >+ `lib_opac` varchar(400) DEFAULT NULL COMMENT 'authorized value description as printed in the OPAC', > `imageurl` varchar(200) DEFAULT NULL COMMENT 'authorized value URL', > PRIMARY KEY (`id`), > UNIQUE KEY `av_uniq` (`category`,`authorised_value`), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 4ec67e57d36..a33f5521556 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -150,11 +150,11 @@ > </li> > <li> > <label for="lib">Description: </label> >- <input type="text" name="lib" id="lib" value="[% av.lib | html %]" maxlength="200" /> >+ <input type="text" name="lib" id="lib" value="[% av.lib | html %]" maxlength="400" /> > </li> > <li> > <label for="lib_opac">Description (OPAC): </label> >- <input type="text" name="lib_opac" id="lib_opac" value="[% av.lib_opac | html %]" maxlength="200" /> >+ <input type="text" name="lib_opac" id="lib_opac" value="[% av.lib_opac | html %]" maxlength="400" /> > </li> > <li><label for="branches">Library limitations: </label> > <select id="branches" name="branches" multiple size="10"> >@@ -402,7 +402,7 @@ > [% CASE 'AUSTLANG' %] > <p>Indigenous Australian languages, sourced from <a href="https://collection.aiatsis.gov.au/datasets/austlang/001">the Australian Institute of Aboriginal and Torres Strait Islander Studies (AIATSIS)</a></p> > [% CASE 'BOR_NOTES' %] >- <p>Values for custom patron messages that appear on the circulation screen and the OPAC. The value in the description field should be the message text and is limited to 200 characters</p> >+ <p>Values for custom patron messages that appear on the circulation screen and the OPAC. The value in the description field should be the message text and is limited to 400 characters</p> > [% CASE 'branches' %] > <p></p> > [% CASE 'Bsort1' %] >-- >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 36153
: 162352 |
162353