Kludge for LP 929172. user/dyrcona/lp929172
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 1 Oct 2012 17:08:38 +0000 (13:08 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 1 Oct 2012 17:20:51 +0000 (13:20 -0400)
When marking a copy claims returned, we manually update the patron's
claims returned count, even though a database trigger apparently does
this for us.  The trigger doesn't update the patron's last_xact_id, but
updating via the perl code does.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm

index 5c2a754..018824f 100644 (file)
@@ -474,6 +474,14 @@ sub set_circ_claims_returned {
     }
 
     $e->update_action_circulation($circ) or return $e->die_event;
+    # Kludge for LP bug 929172: We set the patron's
+    # claims_returned_count and update the patron, even though the
+    # trigger does this for us.  This updates the patron's
+    # last_xact_id.
+    # (https://bugs.launchpad.net/evergreen/+bug/929172)
+    my $crc = $patron->claims_returned_count + 1;
+    $patron->claims_returned_count($crc);
+    $e->update_actor_user($patron) or return $e->die_event;
 
     # see if there is a configured post-claims-return copy status
     if(my $stat = $U->ou_ancestor_setting_value($circ->circ_lib, 'circ.claim_return.copy_status')) {