From 3c16d38a074ce43272ddf74fc7a5cc3733d1ffb1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Jul 2020 10:34:50 +0200 Subject: [PATCH] Bug 22417: Remove record_type from BatchUpdate* We don't need to pass it to the job, they each know which record type they are dealing with --- Koha/BackgroundJob/BatchUpdateAuthority.pm | 5 +---- Koha/BackgroundJob/BatchUpdateBiblio.pm | 5 +---- tools/batch_record_modification.pl | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm index ed634d251d..f965f8da43 100644 --- a/Koha/BackgroundJob/BatchUpdateAuthority.pm +++ b/Koha/BackgroundJob/BatchUpdateAuthority.pm @@ -31,7 +31,6 @@ sub process { ->store; my $mmtid = $args->{mmtid}; - my $record_type = $args->{record_type}; my @record_ids = @{ $args->{record_ids} }; my $report = { @@ -85,16 +84,14 @@ sub enqueue { # TODO Raise exception instead return unless exists $args->{mmtid}; - return unless exists $args->{record_type}; #FIXME RMME return unless exists $args->{record_ids}; my $mmtid = $args->{mmtid}; - my $record_type = $args->{record_type}; my @record_ids = @{ $args->{record_ids} }; $self->SUPER::enqueue({ job_size => scalar @record_ids, - job_args => {mmtid => $mmtid, record_type => $record_type, record_ids => \@record_ids,} + job_args => {mmtid => $mmtid, record_ids => \@record_ids,} }); } diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm index 0870168aae..6eb4501eaf 100644 --- a/Koha/BackgroundJob/BatchUpdateBiblio.pm +++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm @@ -35,7 +35,6 @@ sub process { ->store; my $mmtid = $args->{mmtid}; - my $record_type = $args->{record_type}; my @record_ids = @{ $args->{record_ids} }; my $report = { @@ -92,16 +91,14 @@ sub enqueue { # TODO Raise exception instead return unless exists $args->{mmtid}; - return unless exists $args->{record_type}; #FIXME RMME return unless exists $args->{record_ids}; my $mmtid = $args->{mmtid}; - my $record_type = $args->{record_type}; my @record_ids = @{ $args->{record_ids} }; $self->SUPER::enqueue({ job_size => scalar @record_ids, - job_args => {mmtid => $mmtid, record_type => $record_type, record_ids => \@record_ids,} + job_args => {mmtid => $mmtid, record_ids => \@record_ids,} }); } diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index b28390d297..d9fa8c42d8 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -153,7 +153,6 @@ if ( $op eq 'form' ) { try { my $params = { mmtid => $mmtid, - record_type => $recordtype, record_ids => \@record_ids, }; -- 2.20.1