open-ils.circ.copy_transit.receive uses home_ou when it should use ws_ou

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

Bug Description

Evergreen 2.7+
OpenSRF: N/A
PostgreSQL: N/A

This one is a bit esoteric as the system call is presently only used in checkout.pl in test-scripts as well as by the issa and NCIPServer projects.

When open-ils.circ.copy_transit.receive is called to receive a transit, it uses the requestor's home_ou to determine the context of the transit receive and not the ws_ou. This causes the transit receive to throw up a ROUTE_TO event when the home_ou doesn't match the transit dest, but the ws_ou does.

I would expect the ws_ou to be used.

Some might argue that this is essentially dead code that should be removed, but it still works, except for this one bug, and I've used it in two Evergreen-related projects to avoid going through a check in dance to "receive" copies before checking them out.

open-ils.circ.checkin is potentially more complicated to handle because of the greater variance in possible return values and frankly goes through more steps than are required in the ILL middleware use case.

I'll post a fix branch tomorrow, 10/8.

tags: added: circ receive transit
description: updated
Revision history for this message
Jason Stephenson (jstephenson) wrote :
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I am satisfied that it works.

I wrote a small script to test on my development system based on production data and my own account. My home_ou is 51 and my work_ou is 2 in our system. I was not able to receive transits at 2 before applying the patch, but after I was able to do so.

A live test is difficult to write for this one, unless you want to create bogus transits in concerto and then receive them. I could do that if anyone insists.

Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Well, this is embarrassing:

I noticed this morning that I named the branch for the wrong launchpad bug.

I renamed it, rebased it, and pushed it to working as:

user/dyrcona/lp1503867_copy_transit_receive_ou

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

The mis-named branch has been deleted.

Sorry for any confusion/inconvenience.

Revision history for this message
Mike Rylander (mrylander) wrote :

Picked to master. Thanks, Jason!

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
milestone: none → 2.11.1
milestone: 2.11.1 → none
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.