Bug 15524: (QA follow-up) Pass max_holds at the right position in update
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 16 Feb 2018 11:12:12 +0000 (12:12 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 24 Aug 2018 16:27:26 +0000 (16:27 +0000)
When updating max_holds should be before the categorycode in the update
query.
Things that can be found by testing :)

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

admin/smart-rules.pl

index 1279c4a..eb4ef7b 100755 (executable)
@@ -306,7 +306,7 @@ elsif ($op eq "add-branch-cat") {
             $sth_search->execute($categorycode);
             my $res = $sth_search->fetchrow_hashref();
             if ($res->{total}) {
-                $sth_update->execute( $maxissueqty, $maxonsiteissueqty, $categorycode, $max_holds );
+                $sth_update->execute( $maxissueqty, $maxonsiteissueqty, $max_holds, $categorycode );
             } else {
                 $sth_insert->execute( $categorycode, $maxissueqty, $maxonsiteissueqty, $max_holds );
             }