Koha/Koha
Katrin Fischer c5987b423b Bug 9620: IncludeSeeFromInSearches and data in $9 subfields can break indexing
In Germany 020$9 is used to store the ISBN with hyphens. In rare cases this
can break indexing in combination with IncludeSeeFromInSearches.

To reproduce:
1) Change your frameworks:
  * Make sure 084 $a is visible
  * Create a 084 $9 that you link to PERSO_NAME authorities.
2) Create a record or edit an existing one:
  * Use the plugin on 084 to link the record to an authority.
  * Make sure 400 is filled in your authority record.

Preparations all done, now test indexing:

3) Make sure IncludeSeeFromInSearches is OFF
  * Reindexing should work without any problems.

4) Activate IncludeSeeFromInSearches
  * Reindexing should throw an error and stop:
    201.Subfields are only for data fields (generally,
    just tags >= 010 at /home/koha/Koha/Filter/MARC/EmbedSee
    FromHeadings.pm line 94

5) Apply patch and reindex.
  * No error should occur.
  * Test 4xx fields from other tags were properly indexed.

What causes the problem is the fact, that Koha tries to store
the date from the 400 in the bibliographic record for indexing.
For this it calculates a tag in the bibliographic record from the
tag it found the authority link in and the 4xx tags used in the
authority record. If you have an authority linked to a 0xx field
and the matching authority has a 4xx where xx < 10, the calculated
tag will be a control field. The attempt to add subfields to this
control field, is causing the error and breaks the indexing process.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described, and is a long description :)
Test:
1) Enabled 084 (all subfields visible), added 084_9 (missing from
default framework) linked to PERSO_NAME
2) Edited authority record and added some data to 400
3) Edited bib record, linked 084 to previous auth record
4) With IncludeSeeFromInSearches OFF, re-index without problem
5) With IncludeSeeFromInSearches ON, re-index problems!!!
====================
exporting biblio
====================
1...Subfields are only for data fields (generally, just tags >= 010) at...
Abort
6) Applied patch
7) With IncludeSeeFromInSearches ON, re-index without problem
...
====================
5001....................................................................................................
Records exported: 5060
====================
...
====================
2001....................................................................................................
Records exported: 2024
====================
CLEANING
====================
Good!

*) That's "works as described", don't know if other tests are needed.

No errors from koha-qa

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-07 09:31:11 -05:00
..
Borrower Bug 7067 QA Followup 2012-12-14 08:09:00 -05:00
Cache Bug 8092 follow-up: Fix perlcritic violations 2012-06-14 17:56:56 +02:00
Filter/MARC Bug 9620: IncludeSeeFromInSearches and data in $9 subfields can break indexing 2013-03-07 09:31:11 -05:00
Indexer Bug 7818: utility to generate DOM indexing configs 2012-06-09 11:44:00 +02:00
RecordProcessor Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
SearchEngine Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
SuggestionEngine Merge remote-tracking branch 'origin/new/bug_8209' 2012-10-01 16:39:52 +02:00
Template/Plugin Bug 4173: Followup: Document KohaAuthorisedValues plugin 2012-09-14 16:37:21 +02:00
Authority.pm Bug 7417 follow-up: fix a perlcritic violation 2012-09-14 17:22:11 +02:00
Cache.pm Revert "Bug 8089: Use Koha::Cache for all caching" 2012-09-12 14:12:41 +02:00
Calendar.pm Bug 9211 - days_between wrong behaviour 2013-01-24 09:56:37 -05:00
DateUtils.pm Bug 8652: Followup: add a default value for date_from 2012-10-09 11:27:42 +02:00
RecordProcessor.pm Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
SearchEngine.pm Bug 8233 : SearchEngine: Add a Koha::SearchEngine module 2012-07-06 16:51:58 +02:00
SuggestionEngine.pm Bug 8726: ExplodedTerms suggestion plugin (functionality) 2012-09-28 17:08:21 +02:00