Closed gjerdery closed 4 years ago
I think that's a reasonable approach, better to restrict the resource types to those which have been tested to prevent errors, and if someone wants to explore using other resource types then that support can be added later. It makes sense that we wouldn't have encountered this, we really only use Acquisitions for monographic items. I'll take a look at the commit, thanks!
I discovered that autoLoadItems was including titles that did not have a "worldcatResource" object property set. One example was a set of Gale ebooks which instead had a "kbwcEntryResource" sub-object returned by the api. This meant that most of the bibliographic information was left NULL in the database. This in turn was causing warnings when I tried to update copies.
My solution was to test if $orderItem->resource->worldcatResource was set before attempting to retrieve the item details. Here's the commit on my fork: https://github.com/gjerdery/wmsNewBooks/commit/a4daf7313fe2c5369c3b75d36ca52a9fc6cc4d63
I don't know if this is the "ultimate" solution - might there be other resource types folks would want to include in a load?