Bug 19454: (QA follow-up) Fix selection on categorycode
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 14 Mar 2018 12:22:46 +0000 (13:22 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Mar 2018 14:45:38 +0000 (11:45 -0300)
A follow-up on a preceding report introduced a join instead of a
subquery. This made the categorycode ambiguous.

Test plan:
See former patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

misc/maintenance/borrowers-force-messaging-defaults.pl

index e327834..d88d387 100755 (executable)
@@ -57,7 +57,7 @@ WHERE bo.dateenrolled >= ?|;
     if( $no_overwrite ) {
         $sql .= " AND mp.borrowernumber IS NULL";
     }
-    $sql .= " AND categorycode = ?" if $category;
+    $sql .= " AND bo.categorycode = ?" if $category;
     my $sth = $dbh->prepare($sql);
     $sth->execute($since, $category || () );
     my $cnt = 0;