View | Details | Raw Unified | Return to bug 13379
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-3 / +3 lines)
Lines 98-104 CREATE TABLE `auth_types` ( Link Here
98
DROP TABLE IF EXISTS `authorised_values`;
98
DROP TABLE IF EXISTS `authorised_values`;
99
CREATE TABLE `authorised_values` ( -- stores values for authorized values categories and values
99
CREATE TABLE `authorised_values` ( -- stores values for authorized values categories and values
100
  `id` int(11) NOT NULL auto_increment, -- unique key, used to identify the authorized value
100
  `id` int(11) NOT NULL auto_increment, -- unique key, used to identify the authorized value
101
  `category` varchar(16) NOT NULL default '', -- key used to identify the authorized value category
101
  `category` varchar(32) NOT NULL default '', -- key used to identify the authorized value category
102
  `authorised_value` varchar(80) NOT NULL default '', -- code use to identify the authorized value
102
  `authorised_value` varchar(80) NOT NULL default '', -- code use to identify the authorized value
103
  `lib` varchar(200) default NULL, -- authorized value description as printed in the staff client
103
  `lib` varchar(200) default NULL, -- authorized value description as printed in the staff client
104
  `lib_opac` varchar(200) default NULL, -- authorized value description as printed in the OPAC
104
  `lib_opac` varchar(200) default NULL, -- authorized value description as printed in the OPAC
Lines 291-297 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
291
  `opac_display` tinyint(1) NOT NULL default 0, -- defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)
291
  `opac_display` tinyint(1) NOT NULL default 0, -- defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)
292
  `password_allowed` tinyint(1) NOT NULL default 0, -- defines if it is possible to associate a password with this custom field (1 for yes, 0 for no)
292
  `password_allowed` tinyint(1) NOT NULL default 0, -- defines if it is possible to associate a password with this custom field (1 for yes, 0 for no)
293
  `staff_searchable` tinyint(1) NOT NULL default 0, -- defines if this field is searchable via the patron search in the staff client (1 for yes, 0 for no)
293
  `staff_searchable` tinyint(1) NOT NULL default 0, -- defines if this field is searchable via the patron search in the staff client (1 for yes, 0 for no)
294
  `authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
294
  `authorised_value_category` varchar(32) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
295
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
295
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
296
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
296
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
297
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
297
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
Lines 3495-3501 CREATE TABLE items_search_fields ( Link Here
3495
  label VARCHAR(255) NOT NULL,
3495
  label VARCHAR(255) NOT NULL,
3496
  tagfield CHAR(3) NOT NULL,
3496
  tagfield CHAR(3) NOT NULL,
3497
  tagsubfield CHAR(1) NULL DEFAULT NULL,
3497
  tagsubfield CHAR(1) NULL DEFAULT NULL,
3498
  authorised_values_category VARCHAR(16) NULL DEFAULT NULL,
3498
  authorised_values_category VARCHAR(32) NULL DEFAULT NULL,
3499
  PRIMARY KEY(name),
3499
  PRIMARY KEY(name),
3500
  CONSTRAINT items_search_fields_authorised_values_category
3500
  CONSTRAINT items_search_fields_authorised_values_category
3501
    FOREIGN KEY (authorised_values_category) REFERENCES authorised_values (category)
3501
    FOREIGN KEY (authorised_values_category) REFERENCES authorised_values (category)
(-)a/installer/data/mysql/updatedatabase.pl (+16 lines)
Lines 9579-9584 if ( CheckVersion($DBversion) ) { Link Here
9579
    SetVersion ($DBversion);
9579
    SetVersion ($DBversion);
9580
}
9580
}
9581
9581
9582
$DBversion = "3.19.00.XXX";
9583
if(CheckVersion($DBversion)) {
9584
    $dbh->do(q{
9585
        ALTER TABLE authorised_values MODIFY COLUMN category VARCHAR(32) NOT NULL DEFAULT ''
9586
    });
9587
9588
    $dbh->do(q{
9589
        ALTER TABLE borrower_attribute_types MODIFY COLUMN authorised_value_category VARCHAR(32) DEFAULT NULL
9590
    });
9591
9592
    print "Upgrade to $DBversion done (Bug 13379 - Modify authorised_values.category to varchar(32))\n";
9593
    SetVersion($DBversion);
9594
}
9595
9596
9597
9582
=head1 FUNCTIONS
9598
=head1 FUNCTIONS
9583
9599
9584
=head2 TableExists($table)
9600
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-2 / +1 lines)
Lines 77-83 $(document).ready(function() { Link Here
77
        <fieldset class="rows"><ol>
77
        <fieldset class="rows"><ol>
78
        <li>
78
        <li>
79
        [% IF ( action_add_category ) %]<label for="category">Category: </label>
79
        [% IF ( action_add_category ) %]<label for="category">Category: </label>
80
            <input type="text" name="category"  id="category" size="16" maxlength="16" class="focus" />
80
            <input type="text" name="category"  id="category" size="32" maxlength="32" class="focus" />
81
			 [% ELSE %]<span class="label">Category</span>
81
			 [% ELSE %]<span class="label">Category</span>
82
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
82
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
83
			 [% END %]
83
			 [% END %]
84
- 

Return to bug 13379