Bug 13762 - biblionumber field and subfield can be called once in authorities merge
Summary: biblionumber field and subfield can be called once in authorities merge
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 17:23 UTC by Fridolin Somers
Modified: 2017-06-14 22:07 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13762 - biblionumber field and subfield can be called once in authorities merge (3.51 KB, patch)
2015-02-25 17:30 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2015-02-25 17:23:11 UTC
In AuthoritiesMarc::merge, the call of
  GetMarcFromKohaField( "biblio.biblionumber", '' )
is into several foreach loops.
This call can be extracted to be executed only once.
Also, the biblionumber of each record can be stored in @reccache to avoid finding it twice.
Comment 1 Fridolin Somers 2015-02-25 17:30:31 UTC
Created attachment 36171 [details] [review]
Bug 13762 - biblionumber field and subfield can be called once in authorities merge

In AuthoritiesMarc::merge, the call of
  GetMarcFromKohaField( "biblio.biblionumber", '' )
is into several foreach loops.
This call can be extracted to be executed only once.
Also, the biblionumber of each record can be stored in @reccache to avoid finding it twice.

Test plan :
- Set syspref dontmerge to 'Do'
- Merging 2 authoritites
- Check linked biblio records are impacted
- Change an authority heading
- Check linked biblio records are impacted
Comment 2 Marcel de Rooy 2015-09-03 11:49:54 UTC
Testing this one..
Comment 3 Marcel de Rooy 2015-09-03 11:54:18 UTC
Merged two authority records (A and B; B removed).
Had a biblio with 100 linked to auth A and 700 to auth B.
After merge and reindex still auth B in the biblio record.
(dontmerge=Do)
Comment 4 Fridolin Somers 2016-10-10 14:24:04 UTC
This patch is just code formatting but this code part needs a lot more. And this part is difficult to test.
I close it so it does not impact Bug 11700.