From 7a5dc6eef546bfa4f9465e9f864bacdefe168cd5 Mon Sep 17 00:00:00 2001 From: "Kristina D.C. Hoeppner" Date: Fri, 29 Mar 2013 15:04:42 +1300 Subject: [PATCH] Bug 2046 - Suggestions: Title Field too small Increase both on staff and OPAC interface from 80 to 255 characters to be saved in the database. Shown will be 80 characters. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Clean patch, workes as described. To test: - Apply patch and run database update - Check that the column in the database is now varchar(255) - Enter a new suggestion in the OPAC - Edit this suggestion in staff - Confirm form has the new max value set Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 24097ed922..34a4cec723 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1969,7 +1969,7 @@ CREATE TABLE `suggestions` ( -- purchase suggestions `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) `note` mediumtext, -- note entered on the suggestion `author` varchar(80) default NULL, -- author of the suggested item - `title` varchar(80) default NULL, -- title of the suggested item + `title` varchar(255) default NULL, -- title of the suggested item `copyrightdate` smallint(6) default NULL, -- copyright date of the suggested item `publishercode` varchar(255) default NULL, -- publisher of the suggested item `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time the suggestion was updated diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7c97a5164e..18703d2a78 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6771,6 +6771,13 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ALTER TABLE suggestions CHANGE COLUMN title title VARCHAR(255) DEFAULT NULL;}); + print "Upgrade to $DBversion done (Bug 2046 - increasing title column length for suggestions)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index bd855bf131..e8f06791c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -267,7 +267,7 @@ $(document).ready(function() { calcNewsuggTotal(); });

Enter a new purchase suggestion

[% END %]
Bibliographic information
    -
  1. +
  2. diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt index 65cb297a9c..51f898c06e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt @@ -103,7 +103,7 @@ $.tablesorter.addParser({

    Only the title is required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.

      -
    1. +
    2. -- 2.39.2