bug 2297: improve ModBiblio() to avoid duplicate item fields
authorGalen Charlton <galen.charlton@liblime.com>
Thu, 3 Jul 2008 19:40:59 +0000 (14:40 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 4 Jul 2008 14:22:13 +0000 (09:22 -0500)
commited1cadcd3df3379760190ef01fac48e907373722
tree697f3b0dd2a20ec07ffdbfc334eae7f7e5c1308c
parentc50265d2388017d52ae16f1f367344eb8fd41027
bug 2297: improve ModBiblio() to avoid duplicate item fields

Prior to this patch, ModBiblio() would append
item tags from the previous version of the bib record
to the incoming bib record before saving the results,
even if the incoming bib record already has embedded
item tags.

For example, if a bib is retrieved using GetMarcBiblio() then
saved using ModBiblio(), the caller was obliged
to delete any item tags first to avoid duplication.

ModBiblio() now deletes item tags supplied in the
incoming MARC record.  This eliminates the possibility
of duplication, and removes any implication that
ModBiblio() can or should be used to modify item
records - ModItem() should be used for that.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Biblio.pm
t/lib/KohaTest/Biblio/ModBiblio.pm [new file with mode: 0644]