Skip to content

Handle duplicate barcodes #116

@MagnusEnger

Description

@MagnusEnger

What happens, and what should happen, when you receive an ILL and try to add a barcode that already exists in Koha?

            # Set a barcode, if one was supplied
            my $barcode = $params->{other}->{ill_barcode};
            if ( $barcode ) {
                my $item = Koha::Items->find({ 'biblionumber' => $request->biblio_id });
                if ( $item->barcode ) {
                    warn "Item already has barcode: " . $item->barcode;
                } else {
                    $item->barcode( $barcode );
                    $item->store;
                }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions