Add column picker option for number of holds in item context

Bug #1402770 reported by Blake GH on 2014-12-15
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

Our libraries have expressed and interest for a feature that would allow them to quickly know about holds on items while viewing a list of items. For example, the items out screen, they would like to be able to inform the patron at the desk about which item(s) have holds and therefore cannot be renewed. The patron would presumably, read those items first and return them first knowing that they would not be able to renew them.

It seems like this information could easily be added to the fleshing of an item. An extra query such as:

select count(*) from action.hold_request where cancel_time is null and fulfillment_time is null and capture_time is null and id in
(select hold from action.hold_copy_map where target_copy=**this copy**)

should return the number of holds on a given item and could be displayed along with all of the other columns in the staff client/web based staff client.

This removes the complex query for checking hold types and comparing them to each of the different targets. Instead, let's use the logic that the hold target has already used and query the hold_copy_map.

Kathy Lussier (klussier) on 2015-12-09
Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none →
Andrea Neiman (aneiman) on 2015-12-14
Changed in evergreen:
assignee: nobody → Andrea Neiman (aneiman)
Andrea Neiman (aneiman) wrote :

I have tested this code and consent to signing off on it with my name Andrea Neiman and email address <email address hidden>

Changed in evergreen:
assignee: Andrea Neiman (aneiman) → nobody
tags: added: signedoff
removed: pullrequest
tags: added: pullrequest
Kathy Lussier (klussier) wrote :

Just adding a note that I tested this code with production data, and saw no noticeable performance issues when displaying the holds count for an item that had 600+ holds. I'm also noting that, due to the way the count is generated, you can have different counts for different copies on the same record. I don't think it's a problem, but I'm just making note of it because some users may expect the holds count to match the count they see in the bib record.

The branch will need a release notes entry.

tags: added: needsreleasenote
Kathy Lussier (klussier) wrote :

Thanks Blake! I added Andrea's and my signoff to your commit. I also added a release notes entry and added another commit to make the new column picker option hidden in most item interfaces. It was displaying by default in the Check Out tab, In-House Use screen and other interfaces where the info might not be very useful to users. WIth this commit, it continues to display by default in the xul Items Out tab.

tags: removed: needsreleasenote
Ben Shum (bshum) wrote :

Pushed to master, thanks Blake, Andrea and Kathy!

Changed in evergreen:
milestone: → 2.10-beta
status: Triaged → Fix Committed
Blake GH (bmagic) wrote :

Good call on the hidden default. That thought crossed my mind as well. Thanks for all of the testing!

Blake GH (bmagic) wrote :

Oh - and the code also puts that column option in the web based staff client (I don't think anyone mentioned that)

Kathy Lussier (klussier) wrote :

Hi Blake,

Yes, I saw it in the Items Out tab for the web client. Very nice! i Tried to tweak the code to get it to appear in Item Status in the web client, but gave up when my first few tries didn't work. Thanks for the contribution!

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers