duplicate payments in staff client

Bug #1251774 reported by Jason Etheridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.4
Fix Released
Undecided
Unassigned

Bug Description

The staff client can potentially send incorrect money.payment calls to the middle layer, where a given transaction and its payment is listed more than once in the list of payments. I can't reproduce this and it seems likely to be a bug in how the staff client uses the DOM to store and retrieve data.

There are two complimentary branches that act as a hammer to detect and prevent this, though a real fix would be for the staff client not to do this in the first place.

user/miker/one-payment-per-xact @ working/Evergreen.git
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/one-payment-per-xact

collab/phasefx/duplicate_payments @ working/Evergreen.git
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/phasefx/duplicate_payments

The first one is server-side and defensively rewrites the payment array to use the first reference to any given transaction, and silently drops duplicates.

The second patch is client-side, immediately prior to the network request. It also defensively rewrites the payment array but prompts with an alert dialog for staff to verify the adjusted transactions and asks whether to go through with the payment or not. We may not want to keep the language in the dialog about copy/pasting the provided debug information into a support or helpdesk ticket. I also suspect the linefeeds in that text do not work with the alert dialog. Will check next week, but wanted to get this out there sooner.

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

For the server-side patch, I've signed-off on Mike's command and pushed a follow-up commit which causes the API call to alert and exit early instead of dropping the payment.

user/berick/lp1251774-one-payment-per-xact

Adding pullrequest tag for this branch.

I have not reviewed the UI branch.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.5.1
Revision history for this message
Mike Rylander (mrylander) wrote :

Thanks, Bill. Signed off on your improvement, and committing. Thanks!

Changed in evergreen:
status: New → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
no longer affects: evergreen/2.3
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.