Bug 19843: (bug 15839 follow-up) Set reviews.datereviewed when the review is made
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Dec 2017 19:52:03 +0000 (16:52 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Dec 2017 14:07:51 +0000 (11:07 -0300)
Caused by
  commit 092ae340cef375cc66c8511fd34c1a4eec9c7ba6
    Bug 15839: Koha::Reviews - Remove savereview

the datereviewed=now() part of the query has not been translated.

Test plan:
Add a review from the OPAC
Confirm that the reviews.datereviewd has been correctly set. Without
this patch it is set to NULL.

I have no idea how we could update existing data :-/

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-review.pl

index 39af047..b4a26be 100755 (executable)
@@ -87,6 +87,7 @@ if( !@errors && defined $review ) {
                     {   biblionumber   => $biblionumber,
                         borrowernumber => $borrowernumber,
                         review         => $clean,
+                        datereviewed   => dt_from_string
                     }
                 )->store->reviewid;
             }