Adjusting Bills to Zero Will Prematurely Close a Transaction

Bug #1618624 reported by Jason Stephenson
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.10
Fix Released
Medium
Unassigned
2.11
Fix Released
Medium
Unassigned

Bug Description

Evergreen versions: 2.9.5 and 2.10.5
Postgres: 9.2.10
O/S: Debian Wheezy (7.x)

As commented by Jason Etheridge here https://bugs.launchpad.net/evergreen/+bug/1593815/comments/7, using the account adjustment to adjust balances to zero will set the xact_finish on the transaction prematurely.

This often manifests itself when staff try to renew a circulation. They get an ACTION_CIRCULATION_NOT_FOUND error, even though the circulation exists and has not been checked in, yet.

For example, an item was due on 8/9/16 and the patron wanted to renew it today, 8/30/16. However, the circulation had a xact_finish date of 8/17/16, and ACTION_CIRCULATION_NOT_FOUND was returned. Digging into the bills, account_adjustment payments in the amount of the overdue fines occurred on 8/17/16. It appears that when Adjust to Zero is applied to items that are currently out, xact_finish is updated in the circ table, and therefore no renewals can be made on the items.

This scenario was tested this on training (running 2.10.5) with the same results.

Tags: pullrequest
Revision history for this message
Dan Wells (dbw2) wrote :

I might be looking at this cross-eyed, but it seems like a basic thinko on my part long ago. Here is a possible fix:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbwells/lp1618624_adjust_to_zero_dont_close

working/user/dbwells/lp1618624_adjust_to_zero_dont_close

Right track?

Revision history for this message
Galen Charlton (gmc) wrote :

I think you're on the right track; your patch makes that line match the "if (!$circ || $CC->can_close_circ($e, $circ)) {" test in line 487.

Revision history for this message
Dan Wells (dbw2) wrote :

Added pullrequest and target, as this has sat here for a while, and still looks right to me on a second look. This may also help out bugs #1642378 and #1666622.

tags: added: pull
tags: added: pullrequest
removed: pull
Changed in evergreen:
importance: Undecided → Medium
status: New → Confirmed
milestone: none → 2.12-rc
Revision history for this message
Kathy Lussier (klussier) wrote :

I've confirmed that, with the fix, the system no longer sets an xact_finish date when adjusting currently-checked-out transactions to zero and that renewals can be performed after the adjustments are made. I'll see if it also resolves bug 1666622 before signing off on it.

Revision history for this message
Kathy Lussier (klussier) wrote :

Thank you Dan! I wasn't able to replicate 1666622 to test that one further, but this definitely addresses the problem originally reported here. I've merged your patch to master and backported it to release 2.11 and 2.10.

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.