Koha/t
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
..
db_dependent use bind variables in C4::Acquisition::GetPendingOrders 2008-03-19 15:46:23 -05:00
lib staging import - enhance record overlay behavior 2008-04-30 21:58:46 -05:00
Accounts.t test suite cleanup 2008-01-08 14:08:02 -06:00
Amazon.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
AuthoritiesMarc.t test suite cleanup 2008-01-08 14:08:02 -06:00
Barcodes_PrinterConfig.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Biblio.t test suite cleanup 2008-01-08 14:08:02 -06:00
Bookfund.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Bookseller.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Boolean.t test suite cleanup 2008-01-08 14:08:02 -06:00
Branch.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Breeding.t test suite cleanup 2008-01-08 14:08:02 -06:00
Calendar.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Charset.t IMPORTANT - refactor MARC character set handling 2008-02-03 07:23:56 -06:00
Circulation.t test suite cleanup 2008-01-08 14:08:02 -06:00
database_dependent.pl test framework - two improvements 2008-04-30 21:58:32 -05:00
Date.t test suite cleanup 2008-01-08 14:08:02 -06:00
Dates.t Dates - remove extra newlines from carps, add partial "00" date tests to Dates.t 2008-01-14 16:45:31 -06:00
Debug.t C4::Debug - Centralized debug switches module, test and proof conversion (in Dates.pm) 2008-01-23 21:27:20 -06:00
dummy.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
icondirectories.t Bug 2044: allowing multiuple icon sets 2008-04-24 11:54:18 -05:00
Input.t Input.t permissions fix 2007-11-16 13:24:37 -06:00
Items.t test suite cleanup 2008-01-08 14:08:02 -06:00
Koha.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Labels.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Languages.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Letters.t test suite cleanup 2008-01-08 14:08:02 -06:00
Log.t test suite cleanup 2008-01-08 14:08:02 -06:00
Maintainance.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Makefile test framework - two improvements 2008-04-30 21:58:32 -05:00
Members.t test suite cleanup 2008-01-08 14:08:02 -06:00
NewsChannels.t test suite cleanup 2008-01-08 14:08:02 -06:00
Output.t C4::Output tests -- removed inccorect tests 2008-01-08 14:07:23 -06:00
Overdues.t test suite cleanup 2008-01-08 14:08:02 -06:00
override_context_prefs.pm test suite cleanup 2008-01-08 14:08:02 -06:00
Print.t test suite cleanup 2008-01-08 14:08:02 -06:00
Record.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Reserves.t test suite cleanup 2008-01-08 14:08:02 -06:00
Review.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
rewrite-config-test.PL improvements to automated tests, including a testing database 2008-04-21 11:26:27 -05:00
Search.t test suite cleanup 2008-01-08 14:08:02 -06:00
Serials.t test suite cleanup 2008-01-08 14:08:02 -06:00
Stats.t Total Test Overhaul! Most of these were stubs, and still are. 2007-10-18 16:26:44 -05:00
Suggestions.t test suite cleanup 2008-01-08 14:08:02 -06:00
Z3950.t test suite cleanup 2008-01-08 14:08:02 -06:00