Squashed commit of the following:
commit f441094d5095d165eab18340c983a831cce8f6e0
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date: Mon Jul 5 20:33:23 2010 +0200
bug4263 followup : Can't blank subfields
Previous bug4263 reintroduced bug 2466: fix clearing item field
This keeps bug4263 followup to be assigned (donot blank dateaccessioned)
But also allow to blank item subfields.
commit 92889b766c41b48bdd0e3a33ca4b183b1e259805
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Fri Apr 23 13:54:30 2010 +0200
(bug #4263) dateaccessionned is cleaned on item modification
Every item modification, date accessionned is cleaned, if there is no modification made, we must'nt reset to "undef" the value.
commit 5abb2db16b2564d32e84b7cc680acbc301d73179
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Tue Mar 2 09:57:33 2010 +0100
(bug #4263) fix the edition of items with repeatable subfields
The subfield management in item level is broken, fields are concatenated in one field, and if the librarian edit it, the values are not selected.
This big patch fix three things:
1) saving fields that are stocked in SQL(using koha2marc mapping) are now well cut and separated in _REAL_ subfields
2) loading records with repeatable subfields are now well returned
3) Editing items with repeatable fields works well
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Bug 4263 Removing extranious block of code
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Squashed commit of the following:
commit 105de81639cbac5084e4a5c099b19569043e69ff
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Tue Jul 13 11:58:01 2010 +0200
(bug #4931) fix forgottens input in buttons
the previous patch missed an hidden input in next buttons that break next page. This fix it.
commit db00295a6b9d1d36fc888ba6a0558011fd6884ba
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Fri Jul 2 15:27:59 2010 +0200
(bug #4931) add the ability to choose home or holding branch in stocktaking
This add radio box in stocktaking to base it on home or holdingbranch
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Bug 4391 Followup: Adding back lost declaration of $branchcode
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This adds display of "Use restrictions" authorized values
to the OPAC and the staff client for available and
not-for-loan items.
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Should fix any remaining warnings with 'podchecker'
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
if you have a marc field, mapped to items.stocknumber, it's not saved properly in items.stocknumber
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
* GetItemsInfo now includes a notforloan_per_itemtype key
with the value of the item type's notforloan setting, correctly
set based on the value of the item-level_itypes syspref
* Adjusted OPAC details item status display to use that
notforloan_per_itemtype key
NOTE: one of the assumptions of item-level_itypes is that
you can have either bib-level item types or item-level
item types, but not both in the same database. In particular,
it does not establish a hierarchy where Koha checks the
item-level itemtype first, then the bib-level.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Also fix the barcode not found problem (due to empty lines)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch filters all non itemrelated fields in the marcrecord before making update
AddItemhad the same problem as ModItem
They would try and take fields which would not be item fields
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The inventory tool was using itemcallnumber, title to sort; modified
Items.pm to use cn_sort, itemcallnumber, title so that call numbers
sorted on the padded sort field instead.
The default sort order for items attached to a title in staff mode is
items.dateaccessioned desc. This means that a particular library's holdings
will be scattered through the list -- a special problem when it comes to serial
issues. I've done a change to Items.pm that makes the sort order branch
description followed by dateaccessioned. Thus, a library's holdings will be
grouped together in the display.
* added POD
* removed optional $barcode argument - in all cases,
itemnumber is known, and we should stick with
itemnumber when retrieving an existing item
* use ModItem to do the update so that indexer
will know to reindex bib - otherwise, can't
do an accurate search of items that are on
the shelving cart.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Allows temporary locations corresponding to 'in processing' and 'shelving'
so that newly-created items, and newly-returned items do not show
immediately as a available. Three new system preferences govern the usage
of these features.
NewItemsDefaultLocation. If system pref NewItemsDefaultLocation is set to a location code,
all newly catalogued items will be set to the location set in this preference.
Location code must be a valid LOC authorized value type.
InProcessingToShelvingCart. if the system pref InProcessingToShelvingCart is turned on,
any items run through returns.pl with a location code for 'PROC', will be modified to
have a new location code of 'CART'.
ReturnToShelvingCart. If the syspref ReturnToShelvingCart is turned on,
all items returned other than confirmed holds will have a new location code of 'CART'.
Any item issued is automatically taken of the shelving cart.
Adds a cron script shelf_to_cart.pl which should be run hourly.
Updates all items with a location of CART to the item's permanent location.
The original location code is stored in the new items column 'permanent_location'.
Original Author: PTFS Contractor <dbavousett@ptfs.com>
This work co-sponsored by
Middletown Township Public Library, Middletown, NJ USA and
East Brunswick Public Library, East Brunswick, NJ USA
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Previous conditional check with if ($restype) is not needed because a true
result for one item will result in subsqeuent items defaulting to this true
value.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.
I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch fix 3 things:
* fix order by
* take care of item_level-itype
* use join in sql query
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This correct the html select default in additem.pl, and enforces use of
biblioitems.itemtype as the default in Items::AddItem. The code in
Items is to catch items added through MARC record staging.
Thanks to Joe Atzberger for suggestion.
[RM note: this patch means that an item's item-level item type,
once that item is added or updated via additem.pl,
now cannot be blank or NULL unless the biblio-level item type
is blank.]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds an option to the inventory tool causing it to ignore copies
currently on loan. This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This changes the setting if default values in the inventory tool where
the min and max call number are concerned. Also changes how the query
is formed in C4/Items so that these two are not required.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Change made to GetMarcItem to quell a warning
changed sense of a test; defined($foo) is *not*
the same as $foo ne ''.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The list of previous borrowers on moredetail.pl shows the three oldest
rather than the three most recent as I expected. This changes the sql
to order descending so we get the three most recent.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
When editing an item in the cataloging and serials
item editors, clearing a field now works.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds a new function, getitemtypeimagelocation, that returns the image
unmodified for absolute urls and returns the proper intranet or opac path
otherwise. It also updates all of the relevant files to use that function.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The INSERT was missing the copynumber parameter. moredetail.pl was also not setting
the copyvol template variable. This patch corrects these issues so that the copynumber
is both inserted when a new item is created (including during a bulkmarcimport.pl run)
and displayed properly on moredetail.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch corrects what appears to me to be a few defficiencies in the documentation
for C4::items::GetItemsForInventory. I noticed them while writing test methods for this sub.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The SQL in C4::Items::GetItemsForInventory wasn't using placeholders and
bind parameters, possibly leaving itself open ot SQL injection attacks. This
patch changes that.
I've also incliuded a test module for C4::items::GetItemsForInventory.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
1. restores a check to itemtype.notforloan to set the norequests flag
2. changes improper boolean OR with AND for checking conditions of setting norequests
3. displays 'Not for loan' for item-level itypes when the itemtype is set to notforloan
4. restores items.notforloan values < 0 allowing holds (ordered items for instance)
We still need a notforhold flag set at the itemtype, and items level
* I guess the limit by item type was never working. I made it look for the right database column
* I fixed the error that was returned with no items were returned.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Just some code cleanup of C4::Items::GetLostItems and reports/itemslist.pl.
Some whitespace changes, perltidy, and documentation improvements.
Also, I rewrote and SQL statement to try to reduce possibilities of SQL injection attacks.
No documentation or functional changes necessary with this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I've refactored the subs I added in the previous commit so that they make a little
more sense and are in better places in the code base. I was really hoping to make use
of existing subs, but they all seemed so specific to particular uses.
The icons now show up on the OPAC item details page.
TODO: The icons still don't show up in the OPAC search results page.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The patch update the DB by adding a row in the subscription table (serialsadditems), that is filled with the value of the syspref.
then, the syspref is deleted.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
using as_xml uses default MARC::File::XML format which is UNIMARC for marcflavour UNIMARC
And thus, causing a problem when encoding simple items marc records.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Billing.pl -- new, gives bills that occur in a range, works
pendingreserves.pl -- fixed, works now, with branches also
reserveratios.pl -- indicates distressed reserves
itemslost.pl -- Fix to this to make it more useful and fix bugs
Itmes.pm -- small change to work for itemslost, should not affect
anything else
and all tmpl files.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This fix should resolve in whole or in part several bugs
characterized by the error message 'Can't use string ("0")
as a HASH ref while "strict refs" in use', including
bugs 1101, 1899, and 1910.
There are some possibilities for future work:
[1] Dealing with an operator override, e.g., where
a circ operator needs to get a supervisor
to enter a login and password and escalate
the original operator's privileges for a
transaction, e.g., to forgive a fine. This
is an enhancement, of course.
[2] Creating a dummy operator to represent
batch job runs; or alternatively, give
each batch job an option to log its work
under a specified user ID.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:
* borrowernumber and biblionumber in old_reserves can be
NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
set the child column to NULL if the parent row is deleted
instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
a branch to be deleted without changing archived requests.
Some miscellaneous cleanup was done as part of this patch:
* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
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>