gwu-libraries/launchpad — pull request #898 by edsu (2014-10-28 09:25:23+00:00)
Title: use availabilityId to determine bibid

Up until now we have been using ExternalDocumentID in Summon API search results to determine the bibid to use when linking to item views up until now. But this has proven problematic.

This pull request includes new logic for determining the id to use. It looks for an availabilityId in the Summon document, and if that fails it will use the first availaibilityId in a documents peerDocuments. An availabilityId has two parts, separated by a space, the second part of which is the id.

@cummingsm please test this thoroughly before merging. My existing unit tests in dbtest work fine, but it would be good to have you double check any known problems.

fixes #897