Commit graph

716 commits

Author SHA1 Message Date
Joshua Ferraro
5c23369af2 Fixing Database Definitions for Statuses *PARTIAL*
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>
2008-01-03 16:23:04 -06:00
Chris Cormack
c7215e7a93 Escaping the $title in the regexes with \Q and \E to handle nested quantifiers
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 01:20:40 -06:00
Paul POULAIN
4c2d76e21f small fix to french translation
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 01:15:48 -06:00
Paul POULAIN
1f70b9aa17 french translation updated
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 01:15:47 -06:00
Paul POULAIN
319a32b16e rebuild_zebra : directories updated
the unimarc stuff has been moved to marc_defs directory and the
lang specific is in lang_defs

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 00:55:12 -06:00
Joshua Ferraro
fb61283115 adding release notes for 3.0
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-02 07:49:35 -06:00
Joshua Ferraro
554bbe1bda s/Waited/Expected/ for serials statuses reformating rebuild_nozebra.pl indexes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 12:59:28 -06:00
Joshua Ferraro
6a9b9b09b9 more re-arranging prior to release
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:13:49 -06:00
Joshua Ferraro
062d46800e re-naming some files prior to release
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:13:39 -06:00
Joshua Ferraro
dd3f557f53 fixing nomenclature on files in misc/, adding a few new utilities
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:13:34 -06:00
Joshua Ferraro
c6ddddad98 adding a new option, -w, which disables shadow indexing for the current batch (faster indexing of large sets where ACID isn't critical)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:13:27 -06:00
Joshua Ferraro
dd50153f00 moving some files and deleting cataloguing/updateitem.pl, the _real_ updateitem.pl is in catalogue/
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:09:52 -06:00
Paul POULAIN
d46958af51 replacing SHELF_LOC by LOC, as decided with kados on the chat
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-26 14:33:02 -06:00
Galen Charlton
89e38b5d5f fixed typo in directory name
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:42 -06:00
Galen Charlton
3508933c66 bulkmarcimport: enable MARC-8 to UTF-8 conversion
Enabled automatic conversion of MARC-8 records to
UTF-8.  Record is converted if its Leader/09 contains
a blank and the -s (skip) option hasn't been supplied
on the command-line.  Any record that cannot be converted
to UTF-8 is skipped.

Also now use Unicode Normalization Form C (NFC) for
records converted from MARC-8.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:38 -06:00
Galen Charlton
d426a91d0e removed extraneous comments
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:35 -06:00
Galen Charlton
cb6cf680bc improved error detection in AddBiblioAndItems
Introduced new C4::Biblio function CheckItemPreSave,
which checks for duplicate barcodes and invalid
branch codes.  Not yet sure whether this function
needs to be exported or whether it will just be
used internally to C4::Bibli.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:34 -06:00
Galen Charlton
6b49df4c3f removed superfluous comments
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:31 -06:00
Galen Charlton
7d47666f7e bulk MARC record import - speed improved
Changes to improve speed of MARC bib and item
imports:

[1] Turn off autocommit and commit database
    transactions in larger batches.
[2] Introduce a new C4::Biblio function (AddBiblioAndItems)
    to combine AddBiblio and AddItems -- this is faster
    because we are not parsing the MARC XML of the biblio
    every time we add an item.
[3] Introduce FasterTransformMarcToKoha, which is much
    faster than TransformMarcToKoha.  The new version,
    which will replace the old one once it has been
    fully tested, scans through each field in the
    MARC record just once, instead of potentially
    dozens of times.
[4] Remove code in bulkmarcexport that moved the
    item tags to separate MARC::Record objects.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:28 -06:00
Galen Charlton
4609608ccc allow use of older version of File::Temp
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-22 22:58:12 -06:00
Galen Charlton
4c72d109ce fixed invocation of zebraqueue_daemon.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-22 20:09:34 -06:00
Galen Charlton
0c192a4ece removed extra KOHA_CONF line
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-22 18:59:12 -06:00
Joshua Ferraro
dcb3858ffd Several important commits:
* 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>
2007-12-22 18:26:39 -06:00
paul
d0b4d7fe97 french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-21 07:53:42 -06:00
paul
aa65b7fbf6 staff french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-21 07:51:57 -06:00
paul
6b37b62a5f french staff translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-21 07:44:43 -06:00
Galen Charlton
93beb943c0 bug 1661: rebuild_zebra.pl changes
[1] Use File::Temp to create and manage
    export directory if -d is not specified.
[2] Added usage message.
[3] Code that attempts to fix up Zebra
    configuration files changed so that it
    is invoked only if --munge-config option
    is supplied; this code will ultimately
    either be removed or moved to a separate
    script -- the sorts of errors that it
    tries to fix should no longer be appearing
    in a standard install.
[4] Fixed Win32 portability problem when removing
    temporary directory.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 19:19:43 -06:00
Henri-Damien LAURENT
bdade9bc9d Adding rebuild field 100$a for Unimarc
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 18:40:43 -06:00
Henri-Damien LAURENT
c9fb20928b Generating index for authorities on AUTHtypecode from table auth_header
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 18:30:50 -06:00
Chris Nighswonger
3a85126813 Removing white spaces from directory and filenames as they restrict portability across OS platforms.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-19 18:55:12 -06:00
Galen Charlton
d579648df1 Merge git://git.koha.org/pub/scm/koha 2007-12-18 17:46:54 -06:00
Joe Atzberger
35fa8f148b Delete extraneous empty file.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-17 19:20:58 -06:00
Galen Charlton
b8a58c4934 installer: command-line scripts improve finding C4 modules
Command-line scripts now use a new SCRIPT_DIR/kohalib.pl
to put installed location of Koha's Perl modules
into @INC.
2007-12-17 09:13:54 -06:00
Galen Charlton
f5903fbbb5 installer: location of koha-conf.xml
* rewrite-config.PL now puts in installed location
  of koha-conf.xml in C4/Context.pm so that
  correct config can be found even when
  KOHA_CONF is not set.  Note that setting KOHA_CONF
  will still override path set by installer.
* changed references from koha.xml to koha-conf.xml
2007-12-17 09:13:53 -06:00
Mason James
d9a9e06556 updated MARC21 indexes, with authorites too. v2
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-14 07:43:44 -06:00
Joe Atzberger
377db43117 C4 and misc: permissions fixes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 19:00:34 -06:00
Paul POULAIN
58cf5e62ac french translation, updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 17:56:35 -06:00
Joshua Ferraro
8619dfc0e2 cleanup of misc/ for Dates integration 2007-12-04 19:08:50 -06:00
Joe Atzberger
28159f04de misc subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 18:21:13 -06:00
Joe Atzberger
4717536742 Unrecognized escape \d passed through at misc/bulkauthimport.pl line 28.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 17:59:47 -06:00
Galen Charlton
ad4e02f91d warn on attempts to add duplicate item barcodes during batch import
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-02 15:06:24 -06:00
Galen Charlton
583baef555 MARC21 framework: changed 'items.withdrawn' to 'items.wthdrawn'
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>
2007-11-27 15:51:55 -06:00
Joshua Ferraro
956dd0a13f adding generic POT file
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-26 06:29:24 -06:00
Joshua Ferraro
9abc07111c Re-naming French .po files in line with RFC4646, mail to follow
on koha-devel.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-26 06:24:36 -06:00
Paul POULAIN
059775410f removing useless files
some were already in etc/zebradb, the unimarc specifics one have been copied here

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 17:11:42 -06:00
Paul POULAIN
262a6e2a9a Updating rebuild_zebra.pl : now uses etc config files
There are only 2 UNIMARC specific files (.abs and .chr), they have been moved to etc/zebradb

The rebuild_zebra.pl takes all config file from this location now.
the misc/zebra/ can be removed (and will be soon)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 17:07:46 -06:00
Paul POULAIN
df1ee7a9ca translation to french updated (staff & opac)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 17:07:12 -06:00
Paul POULAIN
90cd15c629 remove a SQL limit & the items table stuff
The authoritative data for the items is the items table, not the MARC data.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 17:00:17 -06:00
Joshua Ferraro
5e469596da fixing limit by availability, using nifty _ALLRECORDS in Zebra
to handle NULL values

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:26:20 -06:00
Joshua Ferraro
14b844cf2f removing marc21 frameworks from misc/ they are in the installer dir now
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:25:58 -06:00