pulibrary / orangelight

PUL Blacklight Project (Ruby 3.1.0, Rails 6.1.7)
20 stars 5 forks source link

Search results - CDL result does not display an 'Online' label next to the availability status. #2995

Open christinach opened 2 years ago

christinach commented 2 years ago

Based on the JS code, CDL records in the search results, should display an 'Online' label next to the availability status. Do we still want to do that?

Example record https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=99125464716806421

We will discuss this on Thursday 05-12-2022 (Orangelight meeting) question came in https://faq.library.princeton.edu/admin/ticket?qid=9414780

christinach commented 2 years ago

During the Orangelight meeting we decided to add the blue online label back and next to the status.

christinach commented 2 years ago

@kevinreiss @mzelesky I checked this record again and noticed that the availability response returns that it is not on cdl, cdl: false. This is why the extra blue online badge is not there. https://bibdata.princeton.edu/bibliographic/availability.json?deep=true&bib_ids=99125464716806421 { "99125464716806421": { "22919898220006421": { "on_reserve": "N", "location": "firestone$pf", "label": "Firestone Library - Remote Storage (ReCAP): Firestone Library Use Only", "status_label": "Unavailable", "copy_number": null, "cdl": false, "temp_location": false, "id": "22919898220006421" } } }

I think we need to look in alma and make sure that this item is in the type of order controlled digital lending and if not to update it.

mzelesky commented 2 years ago

In Alma, the only item on that bib is indeed in the CDL work order.

mzelesky commented 2 years ago

So something is happening with the availability call.

christinach commented 2 years ago

Thank you for checking @mzelesky . I will check

mzelesky commented 2 years ago

When I just clicked the link above, it gave cdl:true.

christinach commented 2 years ago

yeah you are right. I dont know what's going on. I copied the response from the webpage like I did with this one. { "99125464716806421": { "22919898220006421": { "on_reserve": "N", "location": "firestone$pf", "label": "Firestone Library - Remote Storage (ReCAP): Firestone Library Use Only", "status_label": "Unavailable", "copy_number": null, "cdl": true, "temp_location": false, "id": "22919898220006421" } } }

kevinreiss commented 2 years ago

@mzelesky @christinach Would there be any way to include a flag in the data we index that denotes something is on CDL rather than trying to deal with this information in real-time?

christinach commented 1 year ago

for the search results see https://github.com/pulibrary/orangelight/blob/90434bd3b056390d50e8d3d0a3a4e1583ed6941f/app/javascript/orangelight/availability.es6#L168

https://github.com/pulibrary/orangelight/blob/90434bd3b056390d50e8d3d0a3a4e1583ed6941f/app/javascript/orangelight/availability.es6#L134

https://github.com/pulibrary/orangelight/blob/90434bd3b056390d50e8d3d0a3a4e1583ed6941f/app/javascript/orangelight/availability.es6#L369

christinach commented 1 year ago

When closing this ticket. Follow up with Joann: https://faq.library.princeton.edu/admin/ticket?qid=9414780