Koha::Items - Koha Item object set class
my $filtered_items = $items->filter_by_for_hold;
Return the items of the set that are *potentially* holdable. This routine checks only rules defined in the 'Standard rules for all libraries' and should only be used in the context where we don't have a patron to check policies for specifically.
Caller has the responsibility to call C4::Reserves::CanItemBeReserved before placing a hold on one of those items.
my $filered_items = $items->filter_by_visible_in_opac( { [ patron => $patron ] } );
Returns a new resultset, containing those items that are not expected to be hidden in OPAC for the passed Koha::Patron object that is passed.
The OpacHiddenItems, hidelostitems and OpacHiddenItemsExceptions system preferences are honoured.
my $filered_items = $items->filter_out_lost;
Returns a new resultset, containing those items that are not marked as lost.
my $filterd_items = $items->filter_by_bookable;
Returns a new resultset, containing only those items that are allowed to be booked.
$items->move_to_biblio($to_biblio);
Move items to a given biblio.
Koha::Items->search->batch_update { new_values => { itemnotes => $new_item_notes, k => $k, }, regex_mod => { itemnotes_nonpublic => { search => 'foo', replace => 'bar', modifiers => 'gi', }, }, exclude_from_local_holds_priority => 1|0, callback => sub { # increment something here }, } );
Batch update the items.
Returns ( $report, $self ) Report has 2 keys: * modified_itemnumbers - list of the modified itemnumbers * modified_fields - number of fields modified
Parameters:
Allows to set a new value for given fields. The key can be one of the item's column name, or one subfieldcode of a MARC subfields not linked with a Koha field
Allows to modify existing subfield's values using a regular expression
Set the passed boolean value to items.exclude_from_local_holds_priority
Move issues on these items to the old issues table, do not mark items found, or adjust damaged/withdrawn statuses, or fines, or locations.
Callback function to call after an item has been modified
$items->search_ordered;
Search and sort items in a specific order, depending if serials are present or not
Kyle M Hall <kyle@bywatersolutions.com> Tomas Cohen Arazi <tomascohen@theke.io> Martin Renvoize <martin.renvoize@ptfs-europe.com>