Bug 10998 - code duplication introduced by Z39.50 authority search
Summary: code duplication introduced by Z39.50 authority search
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 12112
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 15:32 UTC by Galen Charlton
Modified: 2015-07-21 10:51 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2013-10-04 15:32:41 UTC
Bug 10096, which introduces a feature to import authority records via Z39.50, also introduces some code duplication.

To summarize the differences:

- z3950_search.pl and z3950_auth_search.pl differ only in the input search attributes they accept
- C4::Breeding::ImportBreeding() and C4::Breeding::ImportAuth() do mostly the same thing
- the actual search logic in C4::Breeding::Z3950SearchAuth() and C4::Breeding::Z3950Search() is the same; the two routines differ only in the specific Z39.50 attributes they handle and in some details of post-retrieval record processing.  Also, Z3950SearchAuth() does not reflect the work that was done for bug 10462.

Consequently, there is plenty of opportunity for code consolidation, as well as adding unit tests.
Comment 1 Galen Charlton 2014-04-19 21:50:59 UTC
Note that as of the patch for bug 10462, ImportBreeding() actually does nothing.  Bug 12112 calls for that routine to removed, and I'm setting it as a dependency for this bug.