extended patron attributes tables & syspref (DB rev 081)
authorGalen Charlton <galen.charlton@liblime.com>
Mon, 12 May 2008 13:32:48 +0000 (08:32 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 12 May 2008 14:03:00 +0000 (09:03 -0500)
commit6fc62bcd321eddb0fd3ae46903e9ab6c8b1db2cd
treec5ae61120df890ce85d208b974ece18b457d28f5
parent9ea4ce42865558bc5615be596c8e11d29cc8d684
extended patron attributes tables & syspref (DB rev 081)

Added two tables and system preference to support
a new patron alternate ID and attributes feature.

A patron attribute (or extended patron attribute) is an
additional piece of information associated with a patron
record.  Each attribute has a type that specifies
whether the attribute is repeatable, can serve as
a unique identifier, can take a password, and
whether it can be used to search for patron records
in the staff interface.

The list of attribute types is controlled by the
superlibrarian.  Once an attribute type is defined,
values for that attribute can be added to the patron record
via the staff interface or the batch patron import.

Two uses of extended attributes are:

- defining additional unique identifiers, such as
  a campus student ID number, a library staff
  HR number, and so on.  These IDs can be used
  for searching or matching and overlaying records
  during a batch import.
- additional statistical categories.  For example,
  a library could define an attribute type for
  tracking the academic major of a student patron.
  Any number of attributes of this sort could be
  defined.

The extended attributes feature is completely optional.  If
the new syspref, ExtendPatronAttributes, is OFF, the patron
attributes tables will be ignored; it will not be possible
to display, edit, search for, or match on extended
attributes.

The tables are:

[1] borrower_attribute_types - store attribute types
    defined by the administrator.

    - code
    - description
    - repeatable (whether a patron record can have
      more than value of a given attribute type)
    - unique_id (whether values of this type
      must be unique within the database)
    - opac_display (whether values of this type
      can display in the patron details page in the OPAC)
    - staff_searchable (whether values of this type
      can be used to retrieve patron records in circulation)
    - password_allowed (if set, staff patron editor will
      allow a password to be associated with a value; this
      is mostly a hook for functionality to be implemented
      in the future.
    - authorised_value_category (code of an authorised_value
      category.  If one is specified, the staff patron
      editor will use a dropdown for setting values of this type)
[2] borrower_attributes - the actual attributes.
    - code (attribute type code, FK)
    - borrowernumber (link to patron, FK)
    - attribute (the value)
    - password (password associated with value)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
admin/systempreferences.pl
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
kohaversion.pl