Add column picker option for number of holds in item context

Bug #1402770 reported by Blake GH
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

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.

Revision history for this message
Blake GH (bmagic) wrote :
tags: added: pullrequest
Kathy Lussier (klussier)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 2.next
Andrea Neiman (aneiman)
Changed in evergreen:
assignee: nobody → Andrea Neiman (aneiman)
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Ben Shum (bshum) wrote :

Pushed to master, thanks Blake, Andrea and Kathy!

Changed in evergreen:
milestone: 2.next → 2.10-beta
status: Triaged → Fix Committed
Revision history for this message
Blake GH (bmagic) wrote :

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

Revision history for this message
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)

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.