Bug 30129: remove the third required date that was causing 500 error
authorPetro Vashchuk <stalkernoid@gmail.com>
Fri, 18 Feb 2022 11:42:34 +0000 (13:42 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 22 Feb 2022 01:15:47 +0000 (15:15 -1000)
This problem appeared because of this commit:
Bug 14435 Add the ability to store result's report
cf9031711282f4be23e4a639797d0fd178940e1f

This patch fixes it by removing the third $date that wasn't removed
back then.

To reproduce:
1) Head over to Reports page.
2) Search for report by date. It should cause 500 error.
3) Apply the patch.
4) Repeat the search again, it should be working now.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Reports/Guided.pm

index 310b3e9..7694095 100644 (file)
@@ -740,7 +740,7 @@ sub get_saved_reports {
             $date = eval { output_pref( { dt => dt_from_string( $date ), dateonly => 1, dateformat => 'iso' }); };
             push @cond, "DATE(last_modified) = ? OR
                          DATE(last_run) = ?";
-            push @args, $date, $date, $date;
+            push @args, $date, $date;
         }
         if (my $author = $filter->{author}) {
             $author = "%$author%";