From 716f5458b6b1c6b8396c10b69ff2aa806900e64a 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 Signed-off-by: David Cook Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- 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 16f2e218e9..301a2eb1b8 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 = { @@ -91,16 +90,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 0e2f87d28d..d65883aff2 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -152,7 +152,6 @@ if ( $op eq 'form' ) { try { my $params = { mmtid => $mmtid, - record_type => $recordtype, record_ids => \@record_ids, }; -- 2.39.5