Editing authorisedvalue now checks if OTHER value has the same authorised_value
before storing
id is now passed to the form so that it is used when editing authorised_value
when imageurl it is passed as '' not empty parameter
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
this script had quite serious issues :
- it would not use mindays and maxdays variables
- It would send latin1 where utf8 was expected
- It would send data without text delimiters (; was chosen if title contains ; it would have been a problem " used as delimiters now)
- It would write a file when it was not asked
Now stores the results in a string before printing it.
New option added to store result into a file : -o filename
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Added authorization check - user must have a valid
session cookie to use this feature; before this change,
anybody could use circ/ysearch.pl to retrieve the entire
patron directory without authorization.
* (bug 1953) now uses SQL placeholders
Note: this does, unfortunately, noticeably slow down automcompletion;
this indicates a need for factoring of C4::Auth to make authentication
for AJAX scripts as fast as possible.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Adding a new routine GetBorrowercategoryList in C4/Member
Displaying categoryname when listing categories in memberentrygen.pl
using categorytype returned with GetMember wherever it is possible.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
this patch introduce the same behaviour as for additem.pl, ie : edit only own homebranch items, except for superlibrarians
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When ExtendedPatronAttributes is ON, the batch
patron import tool's behavior changes as follows:
[1] A new (required) column is added to the input CSV
format. This column should contain a list of
attributes to set for the record, each value
preceded by its type code. For example, if
the superlibrarian has defined two types,
a unique identifier INSTID and a repeatable
BASEBALL, this field could contain:
"INSTID:12345,BASEBALL:Cubs"
This field must be wrapped in quotes if multiple
values are defined. Since values can contain
spaces, additional doubled-quotes may be required:
"INSTID:12345,BASEBALL:Cubs,""BASEBALL:White Sox"""
When replacing a patron record, any attributes specified
in the input file replace all of the attribute values
of any type that were previously assigned to the patron
record.
[2] It is possible to specify a field other than the
cardnumber to use for looking for matching patrons.
Specifically, any attribute marked as a unique ID
can be used. The operator is asked to specify
which ID type to use; if an input record has an
attribute value of that type, and exactly one patron
record in the database has that value, then the
record will be overlaid or ignored according to the
overlay setting.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If ExtendedPatronAttributes is ON, patron attributes
can be displayed and edited by staff members.
The patron attributes are displayed and edited
in a new section (step 4) of the patron details page. Each
attribute is identified by its type (including type code
and type description) and value (included value description
if the attribute is controlled by an authorised value category).
Note: if, for a repeatable attribute type, the staff member
enters multiple copies of that type with the same value, duplicates
are removed when the patron record is saved. Also, if the type
is repeatable, a JavaScript link allows the staff member to
create new attributes of that type.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If ExtendedPatronAttributes is ON, any patron attributes
whose type is marked as displayble in the OPAC are now
displayed in the 'my details' page in the OPAC (assuming
that the patron is logged in). These appear in the
'Library Use' section.
Currently, it is not possible for a patron to suggest
changes to any of their extended attributes using
opac-userupdate.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Modified SearchMember() so that if the patron attributes
feature is on (i.e., ExtendedPatronAttributes is ON), it
is possible to search for patrons on any attributes whose
type is set as staff searchable.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Added new script under the Administration menu
to create, update, and delete patron attribute types.
Some things to note:
- once an attribute is created, its code cannot be changed
- the repeatibility and unique_id settings of an
attribute type cannot be changed after creation -
this is to avoid having to deal with changing
constraints if an attribute type is already in use
by patron records
- an attribute type cannot be deleted if it is
used by any patron records
- this administration page is always displayed regardless
of the value of the ExtendedPatronAttributes syspref. If
the syspref is off, the page will prompt the superlibrarian
to turn it on if desired.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Two new modules to support patron attributes:
- C4::Members::AttributeTypes
OO-module for managing patron attribute types.
- C4::Members::Attributes
Procedural module for retrieving and setting
extended attributes belonging to a patron.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
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>
Adjustments to updatedatabase.pl to help ensure that a
DB upgraded from 2.2.9, 3.0-alpha, or 3.0-beta has a schema
identical to a fresh installation.
The changes to the following columns and indexes are to
default values, field widths, position relative to other
columns or index names.
virtualshelfcontents.biblionumber
virtualshelfcontents_ibfk_1 (virtualshelfcontents)
shelfcontents_ibfk_2 (virtualshelfcontents)
sessions.id
deletedbiblioitems.marc
branchcategories.categorycode
branchrelations.categorycode
items.damaged
deleteditems.notforloan
deleteditems.damaged
deleteditems.itemlost
deleteditems.wthdrawn
currency.symbol
subscription.numberlength
subscription.weeklength
serialidx (serialitems)
items.more_subfields_xml
z3950servers.type
deleteditems.more_subfields_xml
opac_news.lang
labels_conf.formatstring
The following missing columns were added:
deletedbiblioitems.marcxml
deleteditems.itype
The 080 DB rev is specifically for syncing the schema
for users of 3.0-alpha, 3.0-beta, and 3.0-beta2, and should
be a no-op for anybody who has followed git HEAD for
the past few months:
subscription.monthlength
deleteditems.marc
aqbooksellers.name
NOTE: this patch does not handle the case of syncing
the DB of a developer or user who has been following
git HEAD since before 3.0-alpha.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Added tests of loading the DB initialization and
sampple data SQL scripts for every language
and MARC flavour combination defined in
installer/data/{dbms}. Errors that the
new test class should catch include:
* SQL syntax errors in kohastructure.sql
* SQL errors in the sample data
For each language and MARC flavour combination,
all mandatory and optional scripts are loaded.
As of this commit, several errors are reported
by this test class; these will be fixed separately.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved routines to clear and create database and manage
zebraqueue_daemon.pl to KohaTest.pm so that they're
available to test classes - needed for installation
and upgrade tests in particular.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* I guess the limit by item type was never working. I made it look for the right database column
* I fixed the error that was returned with no items were returned.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Just some code cleanup of C4::Items::GetLostItems and reports/itemslist.pl.
Some whitespace changes, perltidy, and documentation improvements.
Also, I rewrote and SQL statement to try to reduce possibilities of SQL injection attacks.
No documentation or functional changes necessary with this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch adds a drop-down to the lost items report to let the user select a
particular lost status to display. Only items with that particluar lost status
will be dispolayed.
The documentation for the lost items report on the staff client will need to be slightly adjusted.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This is another fix for a bug that was introduced while adding this feature.
I believe that either this patch or the one at:
http://lists.koha.org/pipermail/koha-patches/2008-May/000309.html
should be applied.
In the case that GetMarcBiblio or GetMarcStructure does not return a true value,
this returns without further processing.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Some minor changes to get the test suite working a bit better:
I removed a superfluous method from t/lib/KohaTest.pm.
I made each barcode for the items added in KohaTest.pm unique so that they would actually get inserted.
Then, I removed t/override_context_prefs.pm. If you need that functionality, you're a database
dependent test and should be a module in t/lib.
So, I deleted all of the trivial .t tests that just 'use'd their modules and had no other
tests and replaced them with lib/KohaTest/*pm modules that do a little bit more checking
on those modules.
I removed the references to override_context_prefs.pm in all of the other .t modules.
They all pass now with no override_context_prefs.pm module.
The database_depenedent.pl test script still does not pass entirely. There's a problem with the zebra index
not being reset each time that the tables are truncated. I'll get to that.
no functional or documentation changes here.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>