Koha/misc
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
..
bin fixed invocation of zebraqueue_daemon.pl 2007-12-22 20:09:34 -06:00
cronjobs moving some files and deleting cataloguing/updateitem.pl, the _real_ updateitem.pl is in catalogue/ 2007-12-30 12:09:52 -06:00
installer_devel_notes/data/en/marcflavour replacing SHELF_LOC by LOC, as decided with kados on the chat 2007-12-26 14:33:02 -06:00
migration_tools Fixing Database Definitions for Statuses *PARTIAL* 2008-01-03 16:23:04 -06:00
release_notes adding release notes for 3.0 2008-01-02 07:49:35 -06:00
spellcheck_suggest installer: command-line scripts improve finding C4 modules 2007-12-17 09:13:54 -06:00
translator small fix to french translation 2008-01-03 01:15:48 -06:00
batchCompareMARCvsFrameworks.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
batchDeleteUnusedSubfields.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
batchImportMARCWithBiblionumbers.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
batchRebuildBiblioTables.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
batchRepairMissingBiblionumbers.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
batchupdateISBNs.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
benchmark.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
check_sysprefs.pl moving some files and deleting cataloguing/updateitem.pl, the _real_ updateitem.pl is in catalogue/ 2007-12-30 12:09:52 -06:00
commit_biblios_file.pl installer: command-line scripts improve finding C4 modules 2007-12-17 09:13:54 -06:00
exportauth.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
kohalib.pl installer: command-line scripts improve finding C4 modules 2007-12-17 09:13:54 -06:00
perlmodule_ls.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
perlmodule_rm.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
sax_parser_print.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
sax_parser_test.pl fixing nomenclature on files in misc/, adding a few new utilities 2007-12-30 12:13:34 -06:00
stage_biblios_file.pl installer: command-line scripts improve finding C4 modules 2007-12-17 09:13:54 -06:00
testKoha.pl C4 and misc: permissions fixes 2007-12-13 19:00:34 -06:00