Patrons with all transactions paid crash open-ils.collections.user_balance_summary.generate

Bug #1427309 reported by Jason Boyer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.6
Fix Released
Undecided
Unassigned
2.7
Fix Released
Undecided
Unassigned

Bug Description

Evergreen: 2.7.2 and older
Other versions: N/A

If a patron in collections pays off all of their bills (the ideal situation!) they will break the generation of any user balance summary file that they should appear in until they're removed from the collections tracker table.

In Collections.pm sub user_balance_summary the balance of all open transactions is requested via a json_query against money.billable_transaction_summary. If there are no open transactions for the current user then the ids parameter is blank and when the SQL is built it has an empty IN clause, aborting the processing of the current user and the entire file. To prevent this, the array of transaction ids needs to be checked to verify there's at least one transaction to return a value for.

Jason Boyer (jboyer)
description: updated
Revision history for this message
Jason Boyer (jboyer) wrote :
Revision history for this message
Jason Boyer (jboyer) wrote :

I forgot to mention, Evergreen Indiana is running this in production and we've been in contact with a collections vendor that could not retrieve full balances before and can now.

I don't personally know how to trigger the file generation, so I've been unable to test it directly. I can see the results of their now successful runs in /openils/var/web/collections/, however.

Jason Boyer (jboyer)
tags: added: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Confirmed the bug and confirmed the patch resolves the issue. Pushed to 2.6+. Thanks, Jason.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
milestone: none → 2.8.1
status: New → Confirmed
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → nobody
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.