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.
my $checked_out_items = $items->filter_by_checked_out;
Returns a new resultset, containing only those items that are currently checked out.
my $in_tranist_items = $items->filter_by_in_transit;
Returns a new resultset, containing only those items that are currently in transit.
my $has_hold_items = $items->filter_by_has_holds;
Returns a new resultset, containing only those items that currently have holds.
my $has_recalls_items = $items->filter_by_has_recalls;
Returns a new resultset, containing only those items that currently have recalls.
Returns a new resultset, containing only those items that currently are part of a bundle.
my $available_items = $items->filter_by_available;
Returns a new resultset, containing only those items that are currently available.
$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
Missing POD for apply_regex.
my $search_result = $object->search( $params, $attributes );
Filters items based on the specified status.
Verify is the input provided with _status is valid.
Since we have to tweak the search for researches involving the _status parameter, if the search involves a _status, we need to check that the provided hashref is compatible with the use case. An hashref is compatible if it is not nested or if the lonely level of nesting is under a "-and" parameter
$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>