Added invocations of StripNonXmlChars to uses
of new_from_xml() that involve records
saved to Koha fields via MARC::Record->as_xml();
for batch jobs that work on MARC XML files
coming from external sources, StripNonXmlChars
should not necessarily be used, as it may
be better to reject a file or record if it
contains that kind of encoding error.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
As a consequence, the items table now remains authoritative
for all item information: any subfields not explicitly mapped
in the framework are still stored.
In addition, the additional unlinked subfields are now retained
during a call to ModItem.
Two additional points of note:
* an upgrade script from 2.2 and earlier 3.0 instllations is needed
to populate items.marc_subfields_xml; I am working on this.
* A behavour of bulkmarcimport.pl has now changed; any item subfields
not explicitly mapped to a Koha items field were dropped; they are
now retained and are stored in items.more_subfields_xml. This can
affect data migrations.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Nonetheless, you are right to consider items table as the reference.
We need one, and we agree on this principle.
What is done with this commit is :
- adding support for marc subfields not linked to items table.
+ removing some $dbh parameters in some function signature.
I think this is rel2_2 style programming and may be avoided using C4::Context->dbh.
Or there is a reason using dbh parameter that you know and not me.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Not displaying Available if itemnotforloan is set (& item is not for loan)
The description of the status is enough (being repaired, excluded from loan, ...)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Also update staff client with serialseq and publisheddate for serial items.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit changes .046 updatedatebase , where itemnumber was changed
to int and keyed on items table. As there is code in serials module that
uses itemnumber (text) as a list of itemnumbers, this change would cause data
loss if that field had multiple items in it.
Instead, we add a new table to link serial and items tables, so that
(1) we can have many items per serial issue, and
(2) staged upgrades that use the serial.itemnumber (text) list won't be affected.
Further commits will make use of the serialitems linking table.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit makes db changes to subscription, serials tables:
allow subscriptions larger than 127 issues
link serial to item uniquely.
MARC Framework:
Adding MARC tag 942$s (990$s unimarc) to map biblio.serial
Udate biblio.serial on new-subscription.
Use biblio.serial to check if Items.pm should return
pubdate and enumeration text string from serials table with items.
Update opac-detail so serial items are sorted most recent first.
Adding link from items table to serial table.
Allows sorting of serials in details pages, and removes
enum data from itemnotes field.
Also fixes visibility in serials item editor
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Replace C4::Biblio::AddBiblioAndItems with two
things:
* An option to C4::Biblio::AddBiblio to defer writing
biblioitems.marc and biblioitems.marcxml. This
option was created to give a significant
speed boost to bulkmarcimport.pl, but is *not*
recommended for general use.
* C4::Items::AddItemBatchFromMarc
This refactoring removes the need to have functions
in C4::Biblio and C4::Items that call each other's
private functions.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Move CheckItemPreSave to C4::Items (from C4::Biblio)
* Modified C4::Biblio::AddBiblioAndItems to use appropriate
internal routines from C4::Items
* Moved GetItemnumberFromBarcode to C4::Items
* Removed duplicate C4::Biblio::_koha_new_items
* Removed disused C4::Biblio::MARCitemchange
Currently AddBiblioAndItems is a special routine that
uses private subs from both C4::Biblio and C4::Items.
This needs to be refactored.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved following functions from C4::Biblio to
C4::Items:
GetItemStatus
GetItemLocation
GetLostItems
GetItemsForInventory
GetItemsCount
GetItemInfosOf
GetItemsByBiblioitemnumber
GetItemsInfo
get_itemnumbers_of
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If an item field with the appropriate itemnumber does not
exist in the MARC bib, the incoming item field is now
just added instead of being ignored.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved this function from an exported function in
C4::Biblio to a public but unexported function
in C4::Items. Added comment noting that this
is used only by additem.pl.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Moved exported ModItemInMarc from C4::Biblio to
C4::Items and renamed to _replace_item_field_in_biblio.
Function is now private and is not exported, as
ModItem is now the sole entry point for updating
an item record.
* Replaced calls to ModItemInMarc in C4::Circulation
with appropriate ModItem calls.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Introduced C4::Items module to separate items API
from biblio API. Details on changes will be
put in later commit messages.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>