[Koha-bugs] [Bug 8002] New: Can't add patron attribute type in newer installation

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 24 17:10:57 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8002

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8002
                CC: gmcharlt at gmail.com
          Assignee: paul.poulain at biblibre.com
           Summary: Can't add patron attribute type in newer installation
        QA Contact: koha.sekjal at gmail.com
          Severity: major
    Classification: Unclassified
                OS: All
          Reporter: oleonard at myacpl.org
          Hardware: All
            Status: NEW
           Version: master
         Component: System Administration
           Product: Koha

The patch for Bug 7154 (Group borrower attributes and link between patron
category and attribute) contains this in updatedatabase.pl:

$dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN category_code
VARCHAR(10) NULL DEFAULT NULL AFTER `display_checkout`");

...which allows borrower_attribute_types.category_code to be NULL.

However, the addition to kohastructure.sql includes:

`category_code` VARCHAR(1) NOT NULL DEFAULT '',-- defines a category for an
attribute_type

...which requires that it /not/ be NULL. Users of new installations will find
that they cannot add patron attribute types if they don't limit it to a patron
category. After trying to add a record without a patron category limit the user
will be told the operation was successful but the entry will not be saved. An
error appears in the log:

patron-attr-types.pl: DBD::mysql::st execute failed: Column 'category_code'
cannot be null at /home/oleonard/kohaclone/C4/Members/AttributeTypes.pm line
220

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list