Commit graph

840 commits

Author SHA1 Message Date
Galen Charlton
6858da97c3 bug 2258 - do not duplicate embedded items
If a MARC bib is modified by this batch job,
do not duplicate the item tags embedded in
it (e.g., 952 for MARC21).  When modifying
a bib record, any embedded item tags must
be removed before calling ModBiblio - perhaps
this should be moved to ModBiblio itself.

Also removed an error in the job's help text.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-18 19:25:07 -05:00
Joshua Ferraro
0990d5c511 Fix for 2174: s/langauge/language/ 2008-06-16 12:46:18 -05:00
Galen Charlton
226822aa0a bypass corrupt bibs when linking headings
During link_bibs_to_authorities.pl run, a bib was
observed that had both biblioitems.marc and biblioitems.marcxml
set to blank or NULL.  Added check to verify that a
defined value is returned from GetMarcBiblio(); may follow
up with additional patches once it's determined how
the corrupt bib came to be loaded.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-16 10:24:28 -05:00
881d0979c4 Small script to identify syspref differences between languages (3). See
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-09 06:42:00 -05:00
Paul POULAIN
df07dac1a9 minor changes in french translation
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 06:04:27 -05:00
Paul POULAIN
1d5616b1f6 french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 06:04:25 -05:00
Paul POULAIN
568d34354e small fixes in french translation
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 06:04:17 -05:00
Ryan Higgins
fad67f6ef2 add single-transaction flag to mysqldump in example backup script.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 06:00:49 -05:00
Joe Atzberger
cf89f763f5 Fix typo in field name, apply branchcode selector logic from fines-ll.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-31 21:59:39 -05:00
Joe Atzberger
2ba8763bb4 Fines repair. Make fines2.pl work, give feedback, improve comments and perldoc.
Remove $dbh->disconnect statements as counterproductive.
Prevent description field from begining with whitespace.
Added robust debug elements.  Test script behavior with:
    perl misc/cronjobs/fines2.pl -v
and:
	mysql> select * from accountlines;

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:42 -05:00
Paul POULAIN
62fe8fde13 small update to french translation
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:37:22 -05:00
bfcdfb7f45 Interface improvements to Holds Queue report and changes to the script provided by jmf
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-20 14:41:44 -05:00
Paul POULAIN
86e53a9f40 bugfixing batchupdateISBN.pl
pls, someone from MARC21 confirm.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-20 12:55:06 -05:00
Galen Charlton
e3f473187e kohabug 2048 - improve zebraqueue_daemon performance
[1] Increase sleep interval between checks of zebraqueue
    from 0.01 seconds to 0.50.
[2] Batch up commits of changes to the zebraqueue table
[3] If the same record appears multiple times in the queue,
    handle only once.
[4] Properly postpone failures to process record deletes to
    avoid spinning.
[5] Correct how queue entries are marked done - avoid skipping
    an authority record update, e.g., if it has the same
    ID number as a bib that was updated.
[6] Added a FIXME about a possible later enhancement to
    batch up updates so that Zebra isn't told to commit
    after each record.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-20 12:55:04 -05:00
Joshua Ferraro
2ee27fb1cc Final update to holds queue work: adds link to holds queue
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
2008-05-20 12:36:40 -05:00
Joshua Ferraro
a9a4965277 Adds a cron script to be run periodically that populates
the tmp_holdsqueue table. This is an alternative holds
targeting workflow that is more suitable for multi-location
libraries than the default holds picklist report.

Note to documentation writers: this summary should be
added to any holds documentation as an overview of
the avaialable methods for holds fulfillment.

This alternative holds workflow assumes an
expectation that the system should target a specific
item for a given hold request, attempt to fulfill the
hold with that item, and if unable to fulfill, select
an available item at another location to fulfill the
hold.

This is quite different than the default Koha behavior
which uses a 'broadcast' method of hold fulfillment.

How it works:

This script weights available locations for holds based
on options specified in two system preferences:

StaticHoldsQueueWeight
	Allows the library to specify a list of library
	location codes -- if used alone, it will rank the
	list statically, selecting the top-ranking available
	location to be added to the picklist.

RandomizeHoldsQueueWeight
	If RandomizeHoldsQueueWeight and StaticHoldsQueueWeight
	are set, the list of library codes in the
	StaticHoldsQueueWeight syspref are randomized rather
	than statically ranked. If RandomizeHoldsQueueWeight
	alone is set, the list of all available library codes
	is used to randomize the weight.

If neither syspref is set, the list is statically
ranked according to how they are pulled out of the system
database.

NOTE: This has not yet been tested with item-level holds
2008-05-20 10:58:24 -05:00
Paul POULAIN
21d0f8f589 french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:07:58 -05:00
Paul POULAIN
dfcdc73be6 bugfix : ship utf-8 encoding in mail header
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:07:55 -05:00
Henri-Damien LAURENT
12a828dd21 Bug Fixing : overduenotices wrote a file on disk before sending to browser
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>
2008-05-12 10:06:31 -05:00
Ryan Higgins
b54401ac66 C4::Circulation::FixOverduesOnReturn now handles dropbox mode.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:14 -05:00
Ryan Higgins
a315de5281 Alter Overdues::CalcFine to use Dates objects.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:12 -05:00
Paul POULAIN
feae120738 BUGFIX : script to fix & fill onloan field in items table.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:24:43 -05:00
Galen Charlton
a78b115d35 kohabug 2076 - make biblioitems.marc longblob during upgrade
Change to match 3.0 definition of that column.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 05:37:18 -05:00
Paul POULAIN
f45f85a227 ordering by biblioitemnumber for best performance
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-05 05:45:41 -05:00
Paul POULAIN
c24bcb0b9d french translation (updated)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-05 05:45:35 -05:00
Paul POULAIN
c4ce77a01f french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-05 05:45:34 -05:00
Paul POULAIN
8e1844d495 missing )
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-05 05:39:13 -05:00
Galen Charlton
438ed23337 staging import - enhance record overlay behavior
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>
2008-04-30 21:58:46 -05:00
Galen Charlton
2fafa1424b kohabug 1776 - try to locate Zebra during install
If running Zebra, try to locate zebrasrv and zebraidx
so that koha-zebra-ctl.sh can point to a functioning
zebrasrv.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 17:59:00 -05:00
Galen Charlton
149ece8541 added RUN_DATABASE_TESTS to install log
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 17:58:59 -05:00
Paul POULAIN
e7209ed02a UNIMARC specific rebuild items correctly
note 995 for items is hardcoded, so it's really for UNIMARC only. The script exit if you're not UNIMARCflavour

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 17:34:41 -05:00
Galen Charlton
f20a58181b kohabug 1776 - enable daemon controls scripts for 'dev' mode
The daemon control scripts (koha-zebra-ctl.sh, koha-zebraqueue-ctl.sh,
and koha-pazpar2-ctl.sh) are now copied and installed in a
runnable fashion for a 'dev'-mode install.  By default
they are installed in the bin subdirectory of the runtime
directory.

Also:

* the control scripts now work if the EUID is other
  than root (as would be expected for a 'dev' or 'single'
  install).
* Split the SCRIPT_DIR installation target into
  SCRIPT_DIR (scripts to copy regardless of install mode)
  and SCRIPT_NONDEV_DIR (scripts to copy to SCRIPT_DIR
  unless the install mode is 'dev').

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 18:17:32 -05:00
Galen Charlton
3109d5820e rebuild_zebra.pl - add -y option
rebuild_zebra.pl will now mark all zebraqueue entries
of the affected record type(s) done when run in
normal mode to index all records (as opposed to running
it with -z to just process the zebraqueue).  This prevents
any running zebraqueue_daemon processes from attempting
to reindex the same records, redundantly.

The new -y swtich overrides this new behavior; in other words, if
running rebuild_zebra.pl without -z, you can specify
-y to *not* mark zebraqueue done.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:17:29 -05:00
004524584b Tweak bullmarcimport.pl
* Add a new parameter -o to begin importing input file after skiping
  n records.
* Enclose input file reading in an eval directive to avoid abording
  import if few records are corrupted: they are now skipped.
* Help formating.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:53 -05:00
e7bf746d6c Two fixes to speed up (a little bit) installation process
Add a explanation on DBD::mysql installation without test suite.
Add /misc/translator/install-code.pl script that creates templates
for specified language codes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:46 -05:00
Ryan Higgins
2eed36a08e Fix calls to CalcFine, and make fines obey CircControl syspref (get homebranch withssue data).
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 08:37:01 -05:00
Ryan Higgins
600d479f4e Add a working fines script, some changes to CalcFine and Circulation.pm
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:54 -05:00
Paul POULAIN
04399ef895 french translation updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:56:33 -05:00
Joshua Ferraro
77f85f0a6a a reminder about tags for the RM
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-04 16:37:10 -05:00
Galen Charlton
e2c1f11715 fixed memory leak I introduced
Accidentally introducing a circular reference in a
MARC::Record object does not lead to goodness, particularly
if you export lots and lots of them.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:46:05 -05:00
Galen Charlton
4f001186b6 still more rebuild_zebra refactoring
Merged duplicate code for indexing bibs and
authorities into a single index_records() function.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:58:03 -05:00
Galen Charlton
a5576b8dfe IMPORTANT: added -z option to rebuild_zebra.pl
The -z option, when used in conjunction with -a and/or -b,
selects the records to reindex from the zebraqueue table.
Both record updates and record deletes are handled.

-z is cannot be used with -s or -r: the updated records
must always be freshly exported, and if zebraqueue
is to be processed, it's assumed that you don't want
to drop the Zebra index first.

This means that rebuild_zebra.pl -b -a -x can be
used as a cronjob to update the indexes periodically; it
is believed that this will offer much better indexing
performance on some setups as compared to zebraqueue_daemon.pl,
which uses Z39.50 extended services to send record updates
to Zebra.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:58:01 -05:00
Galen Charlton
57d128f727 rebuild_zebra: exit if both -a and -x specified
At moment using both -a (index authorities) and
-x (export records as MARC XML) is not allowed -
if the Zebra authority database is using the DOM
filter, zebraidx will not be able to process the
exported records correctly.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:57:44 -05:00
Galen Charlton
f0d5da7448 more rebuild_zebra.pl refactoring
1. Logic to fix up record IDs, UNIMARC 100 field,
   and record leader now in separate functions.
2. Removed (incorrect) logic to save corrected record
   in database.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:57:43 -05:00
Galen Charlton
f98c27a8bc refactor rebuild_zebra: new routine for invoking zebraidx
Created a routine for calling zebraidx, replacing
separate invocations for bibs and authorities.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:57:42 -05:00
Galen Charlton
ae8a76dacc rebuild_zebra.pl: removed disused $limit option
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:57:41 -05:00
Joshua Ferraro
d69ea30d01 just some notes for RMs :-)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-23 00:50:18 -05:00
Joshua Ferraro
93a08fb4d0 updating release notes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-23 00:26:15 -05:00
Joshua Ferraro
7107930b90 updating translations for release
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-22 22:42:57 -05:00
Joshua Ferraro
f818b620a6 Two utilities to help manage translations
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-22 22:42:07 -05:00