Koha::Util::MARC::set_marc_field($record, C4::Context->preference('MarcFieldForModifierName'), $borrowername);
}
Koha::Plugins->call( 'before_biblio_metadata_store', $record );
Koha::Plugins->call(
'before_biblio_action',
{ action => 'save', payload => { biblio_id => $biblionumber, record => $record } }
);
$m_rs->metadata( $record->as_xml_record($encoding) );
$m_rs->store;
Koha::Plugins::Methods->delete;
};
subtest 'before_biblio_metadata_store() hooks tests' => sub {
subtest 'before_biblio_action() hooks tests' => sub {
plan tests => 5;
Koha::Exception->throw("after_hold_create called with parameter " . ref($param) );
sub before_biblio_metadata_store {
sub before_biblio_action {
my ( $self, $record ) = @_;
my ( $self, $params ) = @_;
my $action = $params->{action} // '';
my $payload = $params->{payload};
my $bibli_id = $payload->{biblio_id};
my $record = $payload->{record};
$record->insert_fields_ordered(
MARC::Field->new(
-