Closed GoogleCodeExporter closed 9 years ago
The difference in the two possible list of formats is probably due to Advantage
Accounts. The basic list of formats is supplied in the Metadata object for the
item. However, if logged in and if the item is available, then the Availability
object will supply an action object describing Checkout. One of the descriptors
is the format list, and this is what is shown in the action dialogue. What is
shown otherwise is the basic list of formats.
So, the fix would be to always use the format list that comes with the checkout
action object, if it is present. The complication in coding this extra logic is
that Metadata and Availability are asynchronous API requests; we don't know the
order of their arrival, and the code has scheduled them asynchronously rather
than in parallel.
Original comment by steven3...@gmail.com
on 5 Sep 2014 at 7:35
Modified the code to show format types from the Availability checkout action
object if the item is available, otherwise, show the format types from Metadata.
There was a bit of complication in rescheduling the API calls. For the search
results or record details page, we call Metadata after Availability if logged
in and the item is not available, whereas normally, Metadata and Availability
are called independently. For place hold form, we schedule M and A in parallel
and render the screen after both results are available.
Unfortunately, there is still a problem. If an available item is checked out
and the ebook-kindle format is selected to be locked in, the OD server does not
seem to accept this choice, because in the checkout list, the item will still
show an unselected format type. Only if we select a non-kindle format, will the
format is locked. It's as if ebook-kindle is a false format.
Original comment by steven3...@gmail.com
on 8 Sep 2014 at 7:58
Original issue reported on code.google.com by
lau...@ldsphome.com
on 3 Sep 2014 at 2:39