OPACItemHolds
OPACShelfBrowser
have been added to updatedatabase.
The xslt sysprefs have also been added with a note stating they
only work with MARC21.
Note that when the user is not logged in, the Tags input box/button will not display.
The user will see a message telling them to log in to add tags. However, in order to
keep the results display clean, the message will display only once, utilizing the loop
context variable "__first__". Useful stuff!
I also threw OPACShelfBrowser sysprefs.sql, but it still needs added to updatedatabase.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
[1] Added MARC-8 as an encoding choice on the target
administration page.
[2] Fixed TMPL coding errors.
[3] Set the correct encoding (as it happens, 'MARC-8')
for all of the English sample Z39.50 targets.
Documentation note: due to this patch and the ones from
Frederic, screenshots of the page for editing a Z39.50
target should be redone.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
from circulation dashboard, creates new sysprefs, assigns
the sysprefs to the proper tab in sysprefs (Circulation),
updatedatabase changes to do the previous, and fixing one
redundent limit in the query for build_holds_queue.pl
Note: still need to address item-level holds
used for reporting picklist for holds in multi-location
libraries. This is a temporary workaround to a longer-term
post-3.0 cleanup of the holds process.
Following this will be a cron job for managing the
holds picklist queue as well as a report for viewing
the list of items from circulation
Put the 801$a in tab 8, not 0, so that a valid 801
does not get split by the bib editor.
Signoff from Paul or Henri-Damien requested before
committing this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.
Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.
Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Update MARC21 bib framework to ensure that subfield $9 in 110,
110, 111, 130, 240, 243, 440, 410, 411, and 440 remain
in same bib editing tab as rest of subfields in those fields.
This helps ensure that authority-controlled fields are not
mangled when editing a bib record.
Change also fixes editing tab for subfields in the 037, 584, and
760.
This is DB rev 085.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changed default mandatory and optional MARC21 frameworks
to ensure that all the subfields of 037, 100, 110, 111, 130,
240, 243, 400, 410, 411, 440, 584, and 760 are all either
ignored (tab = -1) or assigned to the same editing tab.
Most of these changes involve the subfield $9 in authority-controlled
fields, which for the affected 1xx, 2xx, and 4xx fields was assigned
to tab 6, not 1, 2, or 4. Because of this, any such field with a
$9 was effectively split, leading to record corruption.
This is part of the fix for bug 2017.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
There is nothing to prevent a user from loading the
sample itemtypes from both 3-LecturePub and 4-Conservation.
To avoid an SQL error (and to let the installer tests
pass), made two of the SQL inserts "INSERT IGNORE" for
sample item types that have the same key.
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>
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>
Adding New Systempreference AddPatronLists
This systempreference allow administrator to choose if patrons are created on categorycode lists or category_type ones.
Overloading GetBorrowerCategory so that if no parameter provided, it returns the list of category records
Changing memberentry.pl in order to use the categorycode when provided.
Bug Fixing Circulation.pl so that doesnot come up with Error 500
with no category selected for GetBorrowerCategory
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Numerous changes to update22to30.pl to help ensure
that a database upgraded from 2.2.9 to 3.0 will have
a DB schema identical to that of a new installation.
These changes were testing by starting from an empty database,
loading koha.mysql from the 2.2.9 package, then running
update22to30.pl
move_marc_to_authheader.pl
move_marc_to_biblioitems.pl
dropping the following tables:
marc_subfield_table
auth_subfield_table
marc_biblio
marc_blob_subfield
auth_word
biblioanalysis
borexp
catalogueentry
charges
itemsprices
marc_word
marcrecorddone
sessionqueries
uploadedmarc
users
websites
z3950queue
z3950results
updatedatabase.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changes to kohastructure.sql to sync with changes
made via updatedatabase.pl:
aqbooksellers.name (DB rev 042)
subscription.serialsadditems (DB rev 071)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The 652 field don't exist in UNIMARC. So linking the new enumchron to a 952 field automatically should be done only for marc21
For UNIMARC, i map it to 995$v, which has been introduced in the last release of the "recommandation 995"
adding the 995$v as well for installer
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Removed the categorytable, mediatypetable, and subcategorytable
tables. These three tables appear to be from an incomplete
patch from pre-git that defined these tables to implement
additional search limits, and are not present in the 2.2.9
package. In 3.0, these tables did nothing - the only code that
referred to them are incomplete admin editors that lack HTML
templates and are not referred to anywhere.
The updatedatabase.pl logic to remove these tables is conservative;
the tables are dropped only if they exist and are all empty. Effectively,
this means that they'll be dropped if you've been running a fresh install
of 3.0 from git or the alphas or betas; if you've upgraded your database
from 2.2.9, these tables likely weren't in your database to begin with.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
tags_all, tags_approval, tags_index; for those tracking
git HEAD, these were already added via updatedatabase.pl
DB rev 073, so there's no DB bump for this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Enhanced the ability of catalogers to specify how
bib and item records should be added, replaced, or
ignored during a staging import.
When an import batch of bib records is staged and commit,
the user can now explicitly specify what should occur
when an incoming bib record has, or does not have, a match
with a record already in the database. The options are:
if match found (overlay_action):
create_new (just add the incoming record)
replace (replace the matched record with the incoming one)
use_template (option not implemented)
ignore (do nothing with the incoming bib; however, the
items attached to it may still be processed
based on the item action)
if no match is found (nomatch_action):
create_new (just add the incoming record)
ignore (do nothing with the incoming bib; in this
case, any items attached to it will be
ignored since there will be nothing to
attach them to)
The following options for handling items embedded in the
bib record are now available:
always_add (add the items to the new or replaced bib)
add_only_if_match (add the items only if the incoming bib
matches an existing bib)
add_only_if_add (add the items only if the incoming bib
does *not* match an existing bib)
ignore (ignore the items entirely)
With these changes, it is now possible to support the following use cases:
[1] A library joining an existing Koha database wishes to add their
items to existing bib records if they match, but does not want
to overlay the bib records themselves.
[2] A library wants to load a file of records, but only handle
the new ones, not ones that are already in the database.
[3] A library wants to load a file of records, but only
handle the ones that match existing records (e.g., if
the records are coming back from an authority control vendor).
Documentation changes:
* See description above; also, screenshots of the 'stage MARC records
for import' and 'manage staged MARC records' should be updated.
Test cases:
* Added test cases to exercise staging and committing import batches.
UI changes:
* The pages for staging and managing import batches now have
controls for setting the overlay action, action if no match,
and item action separately.
* in the manage import batch tool, user is notified when they
change overlay action, no-match action, and item action
* HTML for manage import batch tool now uses fieldsets
Database changes (DB rev 076):
* added import_batches.item_action
* added import_batches.nomatch_action
* added 'ignore' as a valid value for import_batches.overlay_action
* added 'ignored' as a valid value for import_records.status
* added 'status' as a valid value for import_items.status
API changes:
* new accessor routines for C4::ImportBatch
GetImportBatchNoMatchAction
SetImportBatchNoMatchAction
GetImportBatchItemAction
SetImportBatchItemAction
* new internal functions for C4::ImportBatch to
determine how a given bib and item are to be
processed, based on overlay_action, nomatch_action,
and item_action:
_get_commit_action
_get_revert_action
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch adds the ability to associate icon images with authorized values.
They're not displayed anywhere yet, though. There's also a database update
in here. I took version "3.00.00.075", but I can change that later if it gets
taken before I commit these patches.
DOCUMENTATION CHANGES: When you add or edit authorized values, you can now
associate image icons with them. These icons come from the same icon sets
that you can have with your itemtypes, such as media type. They don't show
up anywhere yet, but that's coming. Keep an eye on
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2047
for more updates.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This is the database update change to take into account the rearrangement of the
itemtype icons directory.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
With this addition, it's possible to install Koha in French (fr-FR) and
having the English MARC21 framework. It would be desirable if someone
(a French Canadian?) translate this into French.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The patch update the DB by adding a row in the subscription table (serialsadditems), that is filled with the value of the syspref.
then, the syspref is deleted.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Created a new module, C4::Installer, which embodies
most of the code from installer/install.pl that handles
identifying and loading SQL scripts and setting the
Version, marcflavour, FrameworksLoad, and NoZebra
system preferences.
With C4::Installer, it is now easier to automate
initializing and populating a Koha database. This will
help allow the test suite to set up a test database
in order to run DB-dependent tests, as well as write
a command-line installer which may be of use to hosts
that need to support multiple Koha databases.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Some informations imported into MySQL DB by web installer
were wrongly encoded. It was the case for example with
opac_news table.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
First big commit in a project to add more granular
staff user permissions to Koha.
* Created two new database tables
permissions:
stores a list of defined permissions; each
permission is to be interpreted as a child
of a top-level permission defined in the
existing user flags. For example, Tools (bit 13)
now has a separate sub-permission for each
individual tool.
The columns are
module_bit = FK referencing userflags.bit
code = code, e.g., import_patrons
description = e.g., "Import patron data"
user_permissions:
stores a list of the specific permissions that
a staff user actually has. For example, if
staff user 123 has only the 'import_patrons' subpermission
of 'Tools' (module_bit = 13), that would be represented
by having (123, 13, 'import_patrons' in user_permissions.
user_permissions and borrowers.flags are now interpreted
as follows (assuming the CheckSpecificUserPermissions syspref
is ON):
* If the appropriate bit (e.g., bit 13 for Tools) is set
in borrowers.flags, the staff user can access all
Tools functions. There should be no rows in user_permissions
for that staff user and userflag bit combination.
* If the bit is not set in borrowers.flags, but one or
more rows are present in user_permissions for that
staff user and bit combination, the staff user can
access the specified sub-functions.
* If the bit is not set in borrower.flags and there are
no rows in user_permissions for that staff user and
bit combination, the user cannot access any of the functions.
Note that this means that if a staff user can access all
functions for a module (because the bit is set in borrowers.flags),
the user will automatically be able access any new subfunctions
added to permissions by a database update.
The columns are:
borrowernumber = FK referencing borrowers.borrowernumber
module_bit, code = FK referencing permissions
* Added a new system preference, CheckSpecificUserPermissions
If this system preference is ON, staff users can be assigned
specific permissions which will be respected during
authorization checks. If this system preference is OFF, the
current userflags semantics will continue to apply.
* Defined sub-permissions for Tools. The list of specific
tools permissions is now:
edit_news Write news for the OPAC and staff interfaces
label_creator Create printable labels and barcodes from catalog and patron data
edit_calendar Define days when the library is closed
moderate_comments Moderate patron comments
edit_notices Define notices
edit_notice_status_triggers Set notice/status triggers for overdue items
view_system_logs Browse the system logs
inventory Perform inventory (stocktaking) of your catalogue
stage_marc_import Stage MARC records into the reservoir
manage_staged_marc Manage staged MARC records, including completing and reversing imports
export_catalog Export bibliographic and holdings data
import_patrons Import patron data
delete_anonymize_patrons Delete old borrowers and anonymize circulation history (deletes borrower reading history)
batch_upload_patron_images Upload patron images in batch or one at a time
schedule_tasks Schedule tasks to run
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This reverts commit eaac37aa6ea8c4f2b79adaa4186bc08a9ac9efd4.
Rev 052 in updatedatabase.pl already adds more_subfields_xml
to deleteditems - the reverted patch would attempt to add
more_subfields_xml to deleteditems twice for anybody
upgrading from < 048.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Setting this as a Choice parameter.
This may raise not a performance issue.
Since we were told that loading it local could be longer than getting it from yahoo.
But for poor internet connectivity, it would be a better.
For mobile computer, it is a better choice.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
As announced this past February, Amazon.com will no longer be
accepting web services requests to Amazon E-Commerce Service
(Amazon ECS) version 3.0 beginning on March 31, 2008.
This patch upgrades to Amazon.com's Associates Web Service 4.0
for the following components:
1. Amazon.com Locale support for: Canada, Germany, France, Japan,
UK, and US (see the new syspref called AmazonLocale)
2. Jacket Covers
3. Editorial Reviews
4. Customer Reviews
5. Amazon.com Similar Items
The following changes MUST be made to continue using Amazon.com
content:
1. Delete the system preference: AmazonDevKey (AmazonDevKeys used
with AmazonECS 3.0 are no longer valid)
2. Add the system preferences: AmazonLocale, AWSAccessKeyID
NOTE: steps 1, 2 are done by the web installer
3. Verify your AWSAccessKeyID:
You may already have an Access Key ID. You can access your Access
Key ID by going to http://aws.amazon.com, pointing to Your Web
Services Account, then clicking View Access Key Identifiers.
Depending on when you signed up for ECS 3.0, you may need to
re-register for an AWS account, which includes an Access Key ID.
4. Enter your AWSAccessKeyID in the Koha syspref called
AWSAccessKeyID
For complete details on the changes in Amazon.com Associates Web
Service 4.0, and the migration process, please see: http://tinyurl.com/ysorqy
Other changes with this patch:
* added $tabsysprefs{PatronsPerPage}="Patrons";
* Moved OPAC Features to OPAC in sysprefs
* removed experimental OPACXISBNAmazonSimilarItems and XISBNAmazonSimilarItems features
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:
* borrowernumber and biblionumber in old_reserves can be
NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
set the child column to NULL if the parent row is deleted
instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
a branch to be deleted without changing archived requests.
Some miscellaneous cleanup was done as part of this patch:
* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
TODO: make more sophisticated by checking for
frameworks/sample data that have been translated
to the selected language, just a different location.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This is an improvement of a patch that has previously been rejected: I wanted to display holdingbranch, kados prefer homebranch
(and in fact it depends on the library choice...)
now, the library can choose, thanks to HomeOrHoldingBranch syspref.
Note that I have changed the description of the syspref to reflect this new use
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Disable or Enable the display of query terms in the biblio.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
encoding is now defaulted to MARC8
encoding is now supported for USMARC and UNIMARC flavours.
Adding Encoding field to updatedatabase.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
As a consequence, the items table now remains authoritative
for all item information: any subfields not explicitly mapped
in the framework are still stored.
In addition, the additional unlinked subfields are now retained
during a call to ModItem.
Two additional points of note:
* an upgrade script from 2.2 and earlier 3.0 instllations is needed
to populate items.marc_subfields_xml; I am working on this.
* A behavour of bulkmarcimport.pl has now changed; any item subfields
not explicitly mapped to a Koha items field were dropped; they are
now retained and are stored in items.more_subfields_xml. This can
affect data migrations.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
PatronsPerPage stores the number of patrons to display per page.
Default is 20
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
to let the library decide wheter their patrons can or can't renew checked-out items directly from their account.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Adding encoding for z3950 server information.
Uses Text::Iconv for conversion (ISO6937 and ISO_5428 and ISO5427)
For ISO 5426 (ANSEL or MARC-8) new char_decode5426 based on marc4j tool.
Not Tested on LOC or any USMARC z3950 source. But tested OK on BNF and SUDOC.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit changes .046 updatedatebase , where itemnumber was changed
to int and keyed on items table. As there is code in serials module that
uses itemnumber (text) as a list of itemnumbers, this change would cause data
loss if that field had multiple items in it.
Instead, we add a new table to link serial and items tables, so that
(1) we can have many items per serial issue, and
(2) staged upgrades that use the serial.itemnumber (text) list won't be affected.
Further commits will make use of the serialitems linking table.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit makes db changes to subscription, serials tables:
allow subscriptions larger than 127 issues
link serial to item uniquely.
MARC Framework:
Adding MARC tag 942$s (990$s unimarc) to map biblio.serial
Udate biblio.serial on new-subscription.
Use biblio.serial to check if Items.pm should return
pubdate and enumeration text string from serials table with items.
Update opac-detail so serial items are sorted most recent first.
Adding link from items table to serial table.
Allows sorting of serials in details pages, and removes
enum data from itemnotes field.
Also fixes visibility in serials item editor
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Defined local field 942$a to store the authority type
for MARC21 instead of 152$b
* Added 942$b to MARC21 authority framework.
* Added auth_header.authid and auth_header.authtypecode
to appropriate subfields in MARC21 authority framework.
* Started work on two new modules:
C4::AuthoritiesMarc::MARC21
C4::AuthoritiesMarc::UNIMARC
These modules will be used to extract MARC-format-specific
behavior out of C4::AuthoritiesMarc
* Updated Zebra config for MARC21 to use only the 942$a
for the authority type.
* For MARC21, added logic to move 152$b to 942$a for
existing authority records. Specifically, AddAuthority
now does this move when a record is saved, while
GetAuthority and GetAuthorityXML do this when
extracting a record for other use. This logic
is temporary, and can hopefully be removed later, once
use of 152$b in MARC21 authorities is confirmed to be
absent for Koha users. I will also create a batch
job to do this update in one fell swoop.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Prior to this fix, the status fields had three 'off' values, NULL, "",
and 0. I've reduced it to two in the db, removing the option for NULL, and
setting the default value to 0, however, we need to verify that we don't ever
write out as "" as this needlessly complicates the indexing process,
critical for searching or limiting by status (e.g., availability). Also,
queries that attempt to write a NULL value to one of these fields will fail
(based on my tests).
This patch includes the following changes:
* Updated the database definition for notforloan, damaged, itemlost, and
wthdrawn in kohastructure.sql to forbid NULL and default to 0; MySQL
can't forbid other values (such as empty ""), so this has to be handled
at the application layer and REQUIRES further patching.
* Fixed the 'limit by availability' query node in Search.pm to use a
much less confusing definition of 'available'
* Added code to set values to 0 where they are NULL or empty ( "" ) for
notforloan, damaged, itemlost or wthdrawn in both the MARC and the items
table:
* Biblio.pm -> AddBiblioAndItems
* catalogue/updateitem.pl
* SEE NOTE BELOW, REQUIRES UPDATE TO THE REST OF KOHA'S ITEM MGT!
* Removed code in bulkmarcimport.pl that sets notforloan status depending
on item-level or bib-level itemtype -- that flag is designed to be set
only to override the notforloan setting for the item's (or bib's,
depending on the syspref) assigned itemtype (it doesn't need to override
to 'for loan', only to 'not for loan').
added $dbh->do("truncate zebraqueue"); when operation is 'delete'
* I updated some notes in catalogue/updateitem.pl as to why ModItem can't be
used -- we don't have _a_ place where we can change the item and marc :/
I've tested the following:
bulkmarcimport.pl..........................MARC/items OK
Staged Records Import......................NOT OK
updateitem.pl (via moredetail.pl)..........MARC/items OK
circulation.pl.............................NOT OK
returns.pl.................................NOT OK
addbiblio.pl...............................NOT OK
additem.pl.................................NOT OK
Basically, there isn't a single place to apply this patch that will
update both item data and MARC data in one place ... a future patch
needs to address this issue.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* fix to bug in version 3.00.00.038 update (bad SQL)
* putting finesCalendar and CircControl in Circulation tab in
systempreferences
* changing default for IndependantBranches to 0
* removing ' from integers
* fix canreservefromotherbranches nomenclature
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Fix for Bug 1601: uppercasesurnames system preference needs to be added
* Partial fix for Bug 1711: reinstate the ‘CircControl’ syspref, which is
of type Choice with the following choices: PickupLibrary | PatronLibrary |
ItemHomeLibrary
* reinstate the ‘finesCalendar’ syspref, which is of type Choice with
the following choices: ignoreCalendar | noFinesWhenClosed
* ‘HomeorHoldingbranch’ is deprecated and removed
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Getting Search.pm air tight ... cleaned up some local variables
that were declared global
fix to asynchronous federated searching lost since dev_week, immediate
use is authority search
template fixes to item-level itemtypes and bib-level itemtypes
temp workaround to javascript problems preventing item edits
fix to installer
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When using mysql and a sufficiently recent version
of DBD::mysql that actually respects the mysql_enable_utf8
option, setting the current branch to a name that
includes a diacritic causes the session to fail
and forces the user to the login screen upon
clicking another link.
This turned out to be due to the default (Data::Dumper)
serialization used by CGI::Session, which truncated the
session object at the diacritic. By enabling
that module's YAML serialization option, the problem
was resolved.
This patch introduces a dependency on the YAML::Syck
module.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The former 'Nozebra' op has been renamed to 'SetIndexingEngine'
to avoid having a 'Nozebra' op and a 'NoZebra' parameter
distinguished only by case.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
[1] Web installer no longer sets FOREIGN_KEY_CHECKS = 0
when loading frameworks and sample SQL.
[2] Removed FOREIGN_KEY_CHECKS = 0 from SQL scripts
[3] Fixed FK issues in en/optional/sample_patrons.sql
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* adding zebra daemons for managing server and queue processes
* improvements to the README.debian file
* Fixes to Search.pm since last series of commits broke zebra-based
searching (again)
* moving some files to new misc/bin and misc/cronjobs
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
MySQL-only: improve regex to make sure we are
checking permission on the correct database, not
on another database (when the DB name is a
subset of the DB user's name)
- .txt files have to be in utf-8 (as Koha is utf-8 now), and opened as utf-8 files
otherwise, the diacritics are mixed up on web installer
- typo fix (NoZebra vs Nozebra) to set correctly Nozebra syspref
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The biblio & authorities frameworks have been removed from 1-Obligatoire
and moved to marcflavour new directory.
There are 2 sub-unimarc directories :
- unimarc_complet (complet=full), that contains full unimarc frameworks (not finished)
- unimarc_lecture_pub (lecture_pub = public library), that contains simplified frameworks (should work, although more test needed)
That will let the user choose between 2 differents set of unimarc : public libraries often don't care to handle a too complex marc, while conservation libraries need something complete.
This is one of the major thing that ppl wanted : a more public library friendly Koha.
With HideMarc=ON, public libraries should be very happy with the way cataloguing can be done now.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Note that it's an unfinished work, but those untranslated seems to do nothing.
I've asked koha-devel & will translate the rest when usefull
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Apparently as an inadvertant result of the patches to
move the SQL files to load the MARC frameworks, the
authorised_value of 'cn_source' was dropped for
kohafield = 'items.cn_source' and 'biblioitems.cn_source'.
This patch restores those values, thus making the
classification source set by a dropdown in the bib
and item editors.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Did this because marc21_framework_DEFAULT.sql was the
only install SQL that did this, and thus led to a problem
when the web installer was loading the optional MARC 21
framework SQL before the mandatory one. Because
of the 'delete from', deleted all of the optional rows.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
the file used to have explanation before options in the SQL dump, except the 6 last inserted lines.
I've inverted them to be as the other lines. Not a bugfix, but to avoid having a bug in some months due to the un-noticed difference...
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
HTML::Template is no more used, some were remaining,
fixing the "use ...;" to H::T::Pro only
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The correct field is 'items.wthdrawn', not 'items.withdrawn'.
Spelling may be corrected in post-3.0 version.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Enhancement to store the matching rule associated with an
import batch and to allow the current matching rule in
effect to be changed and the duplicate detection redone.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
also added two missing 'drop table if exists' statements
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changing GanBookBeIssued to use this systempreference
Set to homebranch by default Paul and others you might want to switch this to holdingbranch to get the behaviour you are used to
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Corrected sample label data
* Commented out debug warns and smart comments
* Correct location of a template
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
based on syspref 'item-level_itypes', add an itype col to items table
for 3.2 itype's type will change from varchar(10) to int to allow
circ type definitions per agency.
Note that updatedatabase doesn't populate items.itype, just creates column.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
User could conceivable delete an item, add one with the
same barcode, then delete it again. If key on
deleteditems.barcode is unique, second deletion
will not populate deleteditems.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* biblio.biblionumber
* biblioitems.biblioitemnumber
* items.itemnumber
These IDs are no longer increment by the Perl code, thus
allowing better concurrency during bib/item editing.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The zebraque_start scripts works, but it not friendly when you try to track what he did
as records are deleted after done.
This commit changes the behaviour : 2 columns are added done & timestamp.
done is set to 1 when a line have been done. And the timestamp contains the timestamp of the last action (either line creation if done=0 or operation if done=1)
should be helpfull to track problem.
the table will grow, but i'll add soon a DELETE FROM zebraqueue WHERE timestamp > 30 days or something like that
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* prevents PK warnings when logging actions that occur
faster than once a second (e.g., batch MARC loads) --
the original PK of timestamp + user not granular enough
* timestamp + user still indexed for log viewing
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changing structure :
adding a marcflavour directory to data/language/
This directory shall have the same subdirectory structure as /data/language
This allows for instance adding optionals CD-Framework or Serials Frameworks
keeping default frameworks mandatory.
install.pl was changed in order to manage those changes.
Could be changed in order to skip marcflavour selection if marcflavour directory is not found.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Completely removed old marc_breeding table
* Started updated Tools import function to stage records
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
still to come, but there are outstanding patches that need to be applied
before I can do that.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- bugfix: update items.cn_sort upon edit of item
- bugfix: make failure of a value_builder plugin non-fatal
- bugfix: remove references to non-existent plugins
from optional MARC21 frameworks
bookseller.pl
marc21_callnumber.pl
marc21_classcodes.pl
marc21_locationqualifier.pl
- bugfix: corrected trying to enter 'u*' fields twice in the 'CF'
format in the optional MARC21 frameworks; resulted in
most of the framework not being loaded
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Database schema definitions and system preferences support
for defining classification sources and filing rules.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Most of this commit by Joshua Ferraro.
updatedatabase changes by Galen Charlton.
Major changes:
This commit includes a lot of fairly major changes
to Koha's Biblio handling, largest is the addition
and deletion of several columns in the biblioitems,
items tables, as well as cleanup of deletedbiblioitems,
deleteditems tables. Some of the changes are simple
cleanup, but most have to do with improvements to
storage of call numbers in Koha.
Also, I had to clean up the _koha_* routines quite a
lot to make them work -- there was lots of data just
being lost because columns weren't being updated.
I'm still not completely convinced that the items
table is being treated as authoritative for items
data, investigating further.
DB Changes (updated in kohastructure.sql and in
updatedatabases):
ADDED:
biblioitems.cn_source ( auth value, CN_SOURCE, stores the source of the
call number: DDC, LCC, NLM, etc.)
biblioitems.cn_class ( plugin, marc21_callnumber.pl, helps fill in
the rest of the biblio-level fields)
biblioitems.cn_item
biblioitems.cn_suffix
biblioitems.cn_sort ( for zebra sorting, stored as a decimal number)
biblioitems.totalissues ( for counting the total times issued )
items.cn_source ( auth value, CN_SOURCE, stores DDC, LCC, NLM, etc.)
items.itemcallnumber ( plugin, marc21_itemcallnumber.pl, helps fill in
the itemcallnumber based on the record data )
items.cn_sort ( for zebra sorting, stored as a decimal number)
items.ccode ( auth value, CCODE, stores the Collection Code
of the item, can be used as call number prefix
by some libraries )
items.uri
items.materials
items.damaged
DELETED:
items.itype
items.cutterextra
biblioitems.classification
biblioitems.subclass
biblioitems.dewey
biblioitems.lcsort
biblioitems.lccn
biblioitems.ccode
DB version now 3.00.00.009.
Minor changes:
* Drop revision history from C4/Biblio.pm
* GetMarcAuthors now returns additional authors (7XX), not
main authors (1XX)
* Debug warnings in C4/Search.pm commented out
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- pay.pl fixed, the librarian can see patron fines & mark them paid
- fines2.pl fixed, the script now calculate the fines correctly from the finerules :
* itemtype / patron category if it exist
* itemtype / default if needed
- renamed misc/fines.pl as fines-sanop.pl
- added 2 systempreferences:
* MaxFine: the max amount a patron can be charged for an item
* NoReturnSetLost: how many days of late before a non returned item is marked lost & the patron charged for the full cost of replacement
(those values where hardcoded in fines2.pl
- C4/Circulation/Fines.pm has been removed (unused duplicate of C4/Overdues)
Note that SANOP feature about notify levels have NOT been ported here. I think they are too specific now, and the code is poorly written
I've renammed fines.pl to fines-sanop.pl to point that it is specific.
Thus, all notify_id related features are not used by anything (and always 0)
Can be interesting to reintroduce them, but that will probably be a large work...
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
More revision is required: CVS variables, bad use of map in void context,
overuse of multiple index lines instead of one RegExp, etc. Koha GPL
statement at top needed.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
IMPORTANT NOTE : all existing test database for 3.0 must manually delete ALL constraints on issuingrules table
(the update22to30.pl don't contain the constraints anymore, as kohastructure.sql, so are concerned only the existing 3.0 tests databases)
Filling issuingrules table :
- the issuingrules table can't have a constraint on categorycode, as we have a '*' categorycode (=default issuingrule)
- reintroducing the "default" issuingrule column
- changing some text ('*' replaced by something more explanatory)
- handling correctly the '0' (that is different from 'undefined'
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
editionserponsability.
This commit fixes all editionresponsAbibility. However, that won't change the biblioitems
column name if you have a wrong one in your DB (if you install a new one, or try a migration from 2.2, that should be OK)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- removing old & useless files
- renaming directories
- adding some Public & Research specific files
(copying some LibLime ideas)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
previously, the order was "random". With this patch, you can choose the order
of the file that are shown for adding during install.
Just name the directories: for example 1-Mandatory, 2-Optional, 3-whateveryouwant
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
In fact, #1416 is not a bug, it's a feature : SAN-OP librarians place the reserve "book in hand", and confirm on phone that it's available
NPL save the reserve, but pick them from the shelves once a day only. So the item must be "to pull"
This commit improves the behaviour :
- document Reserves.pm a little, it was needed !
- add a systempreference ReservesNeedReturns, that let the library choose it's behaviour
- define the systempref in english & french systempreferences files
- add the systempref through the web installer (bumping to 3.00.00.003)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
In Koha 3.0, most short code have been resized to varchar(10). This includes itemtype, branchcode, patron category
I've found some tables refering to an old-small-size definition
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
temporary files
Need to add it to a couple more places in C4::Auth
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- adding browser and nozebra table definition to kohastructure & updatedatabase
- bumping to 3.00.00.005
Signed-off-by: Chris Cormack <crc@liblime.com>
local LC call number as used at many North American academic libraries.
Correcting authoritytypecode values where my typo used the number '0' as
part of the value in one table and the letter 'O' in another table.
Improved seealso column indexing values.
Signed-off-by: Chris Cormack <crc@liblime.com>
part of the value in one table and the letter 'O' in another table.
Improved seealso column indexing values.
Signed-off-by: Chris Cormack <crc@liblime.com>
The kohaversion is in the code directory (in /kohaversion.pl)
C4::Context now has a new method C4::Context->KOHAVERSION
that returns the koha code version.
The systempreference Version contains the database version.
If the 2 are differents, when the user log in, he is redirected to web installer (new behaviour : before this commit, the check was done on everypage, it's too CPU costly I think)
In the web installer, we check now if we do a new setup or an upgrade and show only the appropriate link.
The updatedatabase contains a lot of new things :
* SetVersion($kohaversion), that set the kohaversion after each update
* TransformToNum($kohaversion) that returns a number (3.0000001 from 3.00.00.001 for example) for a given koha version
* DropAllForeignKeys($table) that does what is written : drop all foreign keys. A shame it's not possible directly in mySQL...
* for each database update, just :
add the following lines :
=item
Describe what it does for other developpers
=cut
$DBversion = "your.koha.version.dbnumber";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
#
# DO YOUR UPDATE STUFF
#
print "Upgrade to $DBversion done (specify what it does if you want)\n";
SetVersion ($DBversion);
}
IMPORTANT NOTES :
in koha 2.2, a new install was done through installing a 2.2.0 database, then updating it to the installed version.
in Koha 3.0, /installer/kohaversion.sql MUST contain an uptodate version, as the installer set the DB version to kohaversion after uploading kohaversion.sql. It does NOT run updatedatabase.
The update from Koha 2.2 to Koha 3.0 must NOT be done through the webinstaller : updatedatabase is very very long to run and you'll reach Apache timeout for sure. See http://wiki.koha.org/doku.php?id=22_to_30 that contains my notes for upgrading (with some/few UNIMARC specific stuff)
Note For RM, please eyeball this change
Signed-off-by: Chris Cormack <crc@liblime.com>
No longer need all the extra columns, its stored in the a_session, and with CGI::Session
you get back a session object which you can do things like
my $userid = $session->param('userid');
Signed-off-by: kados <jmf@liblime.com>
It is to be mentioned that error came from the use of DBI.
Indeed, we read sql file OK.
But the last command came with no order => error.
Next time we should be more careful.
[Mon Jul 02 20:37:14 2007] [error] [client 71.171.181.120] DBD::mysql::db do failed: Query was empty at /koha/production/intranet/cgi-bin/installer/install.pl line 340, <INPUT> line 1775., referer: http://intranet/cgi-bin/koha/installer/install.pl?step=3
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
skips third party software check and mysql check to go to updatedatabase.
Adding similar check to intranet and opac.
BEWARE !!!!!
You may be linked to install if you donot have Version variable set in your systempreferences table.
If so, simply updatedatabase OR add Version 3.0 record to your systempreferences table.
cvs -z3 -d:ext:kados@cvs.savannah.nongnu.org:/sources/koha co -P koha
find koha.precrash -type d -name "CVS" -exec rm -v {} \;
cp -r koha.precrash/* koha/
cd koha/
cvs commit
This should in theory put us right back where we were before the crash