diff --git a/C4/BackgroundJob.pm b/C4/BackgroundJob.pm index 8bd5feda20..477ea64b62 100644 --- a/C4/BackgroundJob.pm +++ b/C4/BackgroundJob.pm @@ -300,6 +300,25 @@ sub get { return $self->{extra_values}->{$key}; } + +=head2 clear + +=over 4 + +=item $job->clear(); + +=back + +Clear the job from the current session. + +=cut + +sub clear { + my $self = shift; + get_session($self->{sessionID})->clear('job_' . $self->{jobID}); +} + + 1; __END__ diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index beb2b4c02c..f275088533 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -62,6 +62,7 @@ if ( $completedJobID ) { view => 'report', ); output_html_with_http_headers $input, $cookie, $template->output; + $job->clear(); exit; }