Comment 2 for bug 2058786

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

Also confirmed. Looks like it affects the AngularJS renewal page as well, but if you're using that page, you are probably less likely to end up in a situation where you need to cancel a newly-created transit.

The problem appears to be that the variant of open-ils.circ.transit.abort that accepts one or more transit IDs is being used, but is passed the older transit (instead of or in addition to) the new one. When given a transit_id, open-ils.circ.transit.abort does not verify whether the transit has been received before marking it as cancelled.

Looks like fix would be to send the item ID, not the transit ID(s), to open-ils.circ.transit.abort. That variant will look for transits that are actually open.

Noting a couple other things for consideration, possibly as separate bugs:

[1] It is possible for open-ils.circ.transit.abort to fail due to a permissions or policy exception, but the AngularJS interfaces don't catch that.
[2] All invocations of open-ils.circ.transit.abort that are called with a transit_id list should be checked.