-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LWS-89: Loan status #1069
LWS-89: Loan status #1069
Conversation
9ffc06b
to
6fa59bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! LGTM! 🔴 🟡 🟢
- When viewing holdings by work type it would be nice to have a small indication which edition/instance the holding/status refers to. We can coordinate this with improved display of instances/editions on the resource page.
- Perhaps holding/library info fits better on its own "screen" instead of as an expandable section. Let's see when we combine this with more holding information from the record and more Library information.
- Some way to force refresh of loan status other that reloading the whole page? Even though that kind of real time update is almost never needed...
Often when error "Lånestatus är ej tillgänglig" is shown, the message from the api reads "URL till lånestatus för {sigel} ej definierad i LIBRIS biblioteksdatabas!". In old Webbsök, the "Utlånad?" toggle is removed for these libraries. Clearly, a list of libraries connected to the service exist somewhere, but where?
The URL for each library used by the lanstatus
service/API for checking loan status is configured in bibdb.
Webbsök actually checks if the item_status_url
is set in the bibdb database through the webbsök libinfo
service.
https://git.kb.se/libris/legacy/websearch2/-/blob/master/src/main/webapp/transformers/showrecord_libs_orgs.xsl#L437
https://git.kb.se/libris/legacy/libinfo2/-/blob/master/src/main/webapp/getxlibsinfo.jspx#L121
If we want to know if loan status is configured beforehand we need to sync more data from bibdb to the XL library descriptions (before following through on the long term plan and replace bibdb with XL).
A first step could be to catch this specific error and display a more specific message?
To distinguish loan status not implemented from loan status not working.
For sigel Gbg loan status is displayed in old Webbsök, but not here. It has to with webbsök in this case sending the additional param isbn. Api documentation is needed here: when do we need to use it? Webbsök also uses param rp. What does it do?
There are actually four parameters
bib_id
bib-id / control number (see comment)onr
Libris III number of the record if available (see other comment)isbn
ISBN of the instance if availableissn
ISSN of the instance if available
Webbsök checks which ones are used in each each libraryitem_status_url
but I think it should be fine to always pass all of them that we have to the lånstatus proxy service.
https://git.kb.se/libris/legacy/websearch2/-/blob/master/src/main/webapp/transformers/showrecord_libs_orgs.xsl#L438
The rp
parameter seems to be the index in the holding list. Haven't investigated what it really does...
https://git.kb.se/libris/legacy/websearch2/-/blob/master/src/main/webapp/transformers/showrecord_libs_orgs.xsl#L453
See also the old Lånestatus spec https://www.kb.se/download/18.2705879d169b8ba882a43cc/1555822604043/lanestatus_11.pdf
Holdings list for type Electronic never seems to return any status (example), which makes sense. Same thing in webbsök (example). Should we remove status information altogether for electronic?
Good question. In guess in theory e-books can have a limited number of simultaneous loans. I haven't found an example where an Electronic returns a status. We will have to check with a system librarian. Perhaps the connection to "e-media" is just not implemented by any library.
7078d95
to
0c43028
Compare
Co-authored-by: Olov Ylinenpää <51744858+olovy@users.noreply.github.com>
Thanks for such detailed feedback :) I've fixed the following:
Agree with the other points too, maybe revisit them in the next iteration? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚢 💨
Yes, let's revisit the other stuff in the next iteration.
Did some testing and realized that some libraries return ISO-8859-1 encoded strings 😞 e.g. "Umeå universitetsbibliotek (Q)" on 08364r83x33zmkk1 The old status_proxy.jspx just does a simple replace for å, ä and ö. |
I think the ISO-8859-1 encoding might be from the (few) libraries that still use the Z39.50 option. Since we will be removing this option by the end of the year, don't make to much of a workaround for this (if I'm correct about the encoding). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🌟
I have just added a small fix for a breaking test but it looks great otherwise, and will act as a good stepping stone for future iterations. 👍
Description
Tickets involved
LWS-89
Description
Loan status information is now displayed in the holdings panel on demand when clicking a library.
It also supports multiple lookups in parallel if a library has holding of multiple editions/instances of a book (example). This results in somewhat different appearance.
A library with one copy of two different instances/editions:
.
A library with multiple copies of the same edition:
.
Don't know if this difference is important and needs to be conveyed further. A user interested in a specific edition can view it's holdings using the instances list.
Loan status strings are mapped the same way as in the POC to enable i18n etc:
Summary of changes
HOLDING_STATUS_URL=http://lanstatus.libris.kb.se/status/status.php
HoldingStatus
.lint-staged
, had an issue with the husky pre-commit hook that is resolved in 15.2.7.Remaining Issues
Gbg
loan status is displayed in old Webbsök, but not here. It has to with webbsök in this case sending the additional paramisbn
. Api documentation is needed here: when do we need to use it? Webbsök also uses paramrp
. What does it do?Electronic
never seems to return any status (example), which makes sense. Same thing in webbsök (example). Should we remove status information altogether for electronic?