Bug 8757: longer descriptions for authorised values
authorAdrien Saurat <adrien.saurat@biblibre.com>
Tue, 11 Sep 2012 09:16:29 +0000 (11:16 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 18 Sep 2012 10:22:49 +0000 (12:22 +0200)
In the "suggestions" table, the "lib" and "lib_opac" sizes
has been raised from 80 chars to 200.
The GUI allowing the authorised values creation/update has
been changed accordingly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt

index 688c65c..68cdfec 100644 (file)
@@ -99,8 +99,8 @@ CREATE TABLE `authorised_values` ( -- stores values for authorized values catego
   `id` int(11) NOT NULL auto_increment, -- unique key, used to identify the authorized value
   `category` varchar(10) NOT NULL default '', -- key used to identify the authorized value category
   `authorised_value` varchar(80) NOT NULL default '', -- code use to identify the authorized value
-  `lib` varchar(80) default NULL, -- authorized value description as printed in the staff client
-  `lib_opac` VARCHAR(80) default NULL, -- authorized value description as printed in the OPAC
+  `lib` varchar(200) default NULL, -- authorized value description as printed in the staff client
+  `lib_opac` varchar(200) default NULL, -- authorized value description as printed in the OPAC
   `imageurl` varchar(200) default NULL, -- authorized value URL
   PRIMARY KEY  (`id`),
   KEY `name` (`category`),
index 7fc77de..574f1be 100755 (executable)
@@ -5807,6 +5807,15 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.09.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("ALTER TABLE authorised_values MODIFY lib varchar(200)");
+    $dbh->do("ALTER TABLE authorised_values MODIFY lib_opac varchar(200)");
+
+    print "Upgrade to $DBversion done (Raise the length of Authorised Values descriptions)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
index 3af0724..4acaac3 100644 (file)
         </li>
         <li>
             <label for="lib">Description</label>
-            <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="80" />
+            <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="200" />
         </li>
        <li>
             <label for="lib_opac">Description (OPAC)</label>
-            <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="80" />
+            <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="200" />
         </li>
                </ol>
         <div id="icons" class="toptabs" style="clear:both">