I came here via the serials bug recently linked to this. Mike's right on with his diagnosis, but I think we are much closer to already having solution #2 than he realized. It appears copies are already re-sorted on a per-volume level in unapi.acn(), so ranked_volumes need only return volume information ranked according to the "best" copy on each volume, which I believe it already does.
With all that in place, the only thing left to do is actually return the owning_lib.name instead of the circ_lib.name, which is what everything above should expect anyway. Here is an experimental, lightly-tested branch:
I came here via the serials bug recently linked to this. Mike's right on with his diagnosis, but I think we are much closer to already having solution #2 than he realized. It appears copies are already re-sorted on a per-volume level in unapi.acn(), so ranked_volumes need only return volume information ranked according to the "best" copy on each volume, which I believe it already does.
With all that in place, the only thing left to do is actually return the owning_lib.name instead of the circ_lib.name, which is what everything above should expect anyway. Here is an experimental, lightly-tested branch:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ dbwells/ lp1315552_ fix_duplicates_ in_ranked_ volumes
working/ user/dbwells/ lp1315552_ fix_duplicates_ in_ranked_ volumes
Thoughts?