Koha-clms/C4
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
..
AuthoritiesMarc added C4/AuthoritesMarc/*.pm missed in previous patch 2008-01-04 19:08:30 -06:00
Barcodes PrinterConfig.pm - BEGIN block VERSION and vars related to export. 2008-01-07 20:02:21 -06:00
ClassSortRoutine ignore "/" when sorting Dewey call numbers 2007-10-23 18:24:29 -05:00
External C4/External/BakerTaylor.pm - Back end for B&T content. 2008-04-22 18:02:33 -05:00
Heading authority headings search: remove CCL metacharacters 2008-02-08 06:01:43 -06:00
OAI OAI-PMH second try 2008-02-27 09:02:20 -06:00
SIP Changing CanBookBeRenewed to pass back the reason a renewal cannot proceed 2008-01-08 16:13:20 -06:00
Search FRBR: added OPAC search result grouping option 2008-02-11 16:35:17 -06:00
VirtualShelves fixing display of itemtypes and itemtype icons in virtual shelves 2008-03-17 20:12:38 -05:00
tests Patch from Galen Charlton, removing $Id$ $Log$ and $Revision$ from files 2007-10-18 20:22:01 -05:00
Accounts.pm bug 2006: do not crash when paying a lost item fine 2008-04-10 15:52:55 -05:00
Acquisition.pm bug 1953: removing possible SQL injections from C4::Acquisition::GetHistory 2008-04-11 16:56:36 -05:00
Amazon.pm adding famfamfam iconset, improving isbn for amazon content, etc. 2008-04-07 21:20:22 -05:00
Auth.pm Adding authorised value icons display in the search results 2008-04-30 21:07:29 -05:00
Auth_with_ldap.pm Perldoc fixes - Auth_with_ldap.pm and Log.pm 2007-12-13 19:00:35 -06:00
AuthoritiesMarc.pm unlocking table when adding/updating authorities is finished. 2008-04-24 11:51:48 -05:00
BackgroundJob.pm C4 - BEGIN blocks and 1; __END__ for modules 2008-01-07 20:02:18 -06:00
Biblio.pm Bug 2047: adding images to arbitrary authorized values 2008-04-30 20:10:43 -05:00
Bookfund.pm bug-1494, fixed bookfund modify code 2007-11-01 17:27:55 -05:00
Bookseller.pm acqui/addorder.pl - use reliable GetBookSellerFromId instead of relying on name search. 2008-03-08 11:19:27 -06:00
Boolean.pm Boolean.pm - BEGIN block VERSION and vars related to export. 2008-01-07 20:02:24 -06:00
Branch.pm Removing replace statement from C4::Branch as per bug 1546 2008-01-08 19:23:41 -06:00
Breeding.pm IMPORTANT - refactor MARC character set handling 2008-02-03 07:23:56 -06:00
Calendar.pm removed warns 2008-03-15 08:36:40 -05:00
Charset.pm work around issue in MARC::Charset 2008-04-01 06:46:04 -05:00
Circulation.pm Add dropbox mode to return.pl. Small API change to allow setting 2008-04-22 17:54:20 -05:00
ClassSortRoutine.pm call number work part 2 -- added framework for call number filing routines 2007-10-21 22:11:37 -05:00
ClassSource.pm call number work part 3 -- now using new routines to generate call number sort keys 2007-10-21 22:11:40 -05:00
Context.pm Add backtrace printing option through SetEnv KOHA_BACKTRACES 1 2008-04-03 14:44:31 -05:00
Date.pm removing all useless %env / $env 2007-04-18 17:00:14 +00:00
Dates.pm Dates.pm - trivial perldoc corrections 2008-04-08 17:00:07 -05:00
Debug.pm C4::Debug - should resolve conflict w/ CGI upload. Debug no longer uses CGI. 2008-03-16 08:32:20 -05:00
Heading.pm Porting SimpleSearch return changes to all code calling it. 2008-04-17 05:52:45 -05:00
ImportBatch.pm staging import - enhance record overlay behavior 2008-04-30 21:58:46 -05:00
Input.pm Input.pm - perldoc correction 2007-12-27 17:21:07 -06:00
Installer.pm refactor web installer code to created C4::Installer 2008-04-21 11:26:23 -05:00
Items.pm Bug 2047: adding images to arbitrary authorized values 2008-04-30 20:10:43 -05:00
Koha.pm bug 2047: refactoring icon manipulation logic 2008-04-30 20:10:09 -05:00
Labels.pm More labels repair: FIXME's added, warns $debug-ified. 2008-04-30 06:09:02 -05:00
Languages.pm adding famfamfam iconset, improving isbn for amazon content, etc. 2008-04-07 21:20:22 -05:00
Letters.pm refactor C4::Log::logaction 2008-03-19 06:34:10 -05:00
Log.pm refactor C4::Log::logaction 2008-03-19 06:34:10 -05:00
Maintainance.pm rel_3_0 moved to HEAD (introducing new files) 2007-03-09 15:34:17 +00:00
Matcher.pm Porting SimpleSearch return changes to all code calling it. 2008-04-17 05:52:45 -05:00
Members.pm use bind variables in GetBorrowersWhoHaveNotBorrowedSince query 2008-03-19 11:08:56 -05:00
NewsChannels.pm NewsChannels.pm - BEGIN block VERSION and vars related to export. 2008-01-07 20:02:36 -06:00
Output.pm Removing extra warn 2008-02-03 07:23:37 -06:00
Overdues.pm Fix calls to CalcFine, and make fines obey CircControl syspref (get homebranch withssue data). 2008-04-08 08:37:01 -05:00
Print.pm Print.pm - BEGIN block VERSION and vars related to export. 2008-01-07 20:02:39 -06:00
Record.pm fixed MODS biblio export on a "standard" install 2008-04-01 06:46:08 -05:00
Reports.pm bug 2004: changes to guided reports on items 2008-04-08 17:00:12 -05:00
Reserves.pm Revert "2 FixPriority calls were broken. FixPriority itself may be broken too," 2008-04-22 19:16:30 -05:00
Review.pm Bugfix #1624 - remove problem w/ EXPR in template, minor cleanup of module. 2008-04-22 18:06:38 -05:00
SMS.pm SMS - widespread cleanup and moving code away from Cyprus/Turkey-specific implementation. Much more needed. 2008-02-06 23:19:30 -06:00
Scheduler.pm Pretty sure that "S" is needed. Significant typo. 2008-04-22 18:06:37 -05:00
Search.pm Adding authorised value icons display in the search results 2008-04-30 21:07:29 -05:00
Serials.pm IMPROVEMENT : serialsadditems at subscription level (bump 071) 2008-04-22 17:34:33 -05:00
Stats.pm Work in progress, working on the til reconciliation report 2008-01-07 20:49:16 -06:00
Suggestions.pm Accept or reject : Bug Fix and improvements. 2008-04-17 05:52:47 -05:00
Tags.pm Tags - module, script and template support for user tagging in OPAC. 2008-04-22 18:02:44 -05:00
UploadedFile.pm C4 - BEGIN blocks and 1; __END__ for modules 2008-01-07 20:02:18 -06:00
Utils.pm Big LDAP changes, module test for Context.pm, still more yet to come. 2007-12-04 17:27:06 -06:00
VirtualShelves.pm Shelves - fixup display, in particular intranet side 2008-02-22 21:49:06 -06:00
XISBN.pm adding famfamfam iconset, improving isbn for amazon content, etc. 2008-04-07 21:20:22 -05:00
XSLT.pm Normalizing s/On loan/Checked out/ 2008-04-25 15:28:14 -05:00
Z3950.pm Z3950.pm - BEGIN block VERSION and vars related to export. 2008-01-07 20:02:50 -06:00