View | Details | Raw Unified | Return to bug 22690
Collapse All | Expand All

(-)a/Koha/Item.pm (-4 / +4 lines)
Lines 1192-1198 sub orders { Link Here
1192
1192
1193
  $item->move_to_biblio($to_biblio[, $params]);
1193
  $item->move_to_biblio($to_biblio[, $params]);
1194
1194
1195
Move the item to another biblio and update any references also in other tables.
1195
Move the item to another biblio and update any references in other tables.
1196
1196
1197
The final optional parameter, C<$params>, is expected to contain the
1197
The final optional parameter, C<$params>, is expected to contain the
1198
'skip_record_index' key, which is relayed down to Koha::Item->store.
1198
'skip_record_index' key, which is relayed down to Koha::Item->store.
Lines 1237-1243 sub move_to_biblio { Link Here
1237
    # Holds
1237
    # Holds
1238
    $self->holds->update({ biblionumber => $to_biblionumber });
1238
    $self->holds->update({ biblionumber => $to_biblionumber });
1239
1239
1240
    # hold_fill_target (there's no Koha object available)
1240
    # hold_fill_target (there's no Koha object available yet)
1241
    my $hold_fill_target = $self->_result->hold_fill_target;
1241
    my $hold_fill_target = $self->_result->hold_fill_target;
1242
    if ($hold_fill_target) {
1242
    if ($hold_fill_target) {
1243
        $hold_fill_target->update({ biblionumber => $to_biblionumber });
1243
        $hold_fill_target->update({ biblionumber => $to_biblionumber });
Lines 1254-1260 sub move_to_biblio { Link Here
1254
        }
1254
        }
1255
    );
1255
    );
1256
1256
1257
    # linktrackers
1257
    # linktrackers (there's no Koha object set available yet)
1258
    # direct lookup as there's no foreign key relationship yet
1258
    my $schema = Koha::Database->new()->schema();
1259
    my $schema = Koha::Database->new()->schema();
1259
    my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber });
1260
    my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber });
1260
    $linktrackers->update_all({ biblionumber => $to_biblionumber });
1261
    $linktrackers->update_all({ biblionumber => $to_biblionumber });
1261
- 

Return to bug 22690