Open
Conversation
Some seasonal items had holds disabled because 7-day holds led to long waitlists with no-shows. But no holds meant members calling librarians to set items aside informally. Tessa suggested 1-day holds as a middle ground. Adds hold_duration to items with a dropdown in the admin form. When set, expiration uses Event.next_open_day so "1 day" means the next day the library is actually open. Default 7-day behavior is unchanged for items without an explicit duration. Member-facing copy updated across item detail, place-hold button, holds sidebar, and notification email. Closes #2115
Switch the "heads up" text from gray italic to a toast-warning callout box for better visibility. Add a similar nudge on the "you have this on hold" view when the item is ready for pickup but no appointment is scheduled yet.
jim
approved these changes
Mar 26, 2026
| expires_at = if item.hold_duration | ||
| Event.next_open_day(now + item.hold_duration.days).end_of_day | ||
| else | ||
| (now + DEFAULT_HOLD_DURATION.days).end_of_day |
Member
There was a problem hiding this comment.
This would be change in behavior, but I wonder if we should also make this branch use Event.next_open_day so that we aren't picking a day that we're closed? It would make closing for holidays more seamless.
Contributor
Author
There was a problem hiding this comment.
Yeah I thought about this a while too - I made the more conservative change to start... but if we agree it's strictly better I can make the change!
Member
There was a problem hiding this comment.
Not a big deal either way! We can merge this as-is to unblock staff and then make the other change if everything is working.
Comment on lines
+1
to
+5
| <% if short_hold_item?(item) %> | ||
| <div class="toast toast-warning text-small"> | ||
| <strong>Heads up:</strong> this item has a short hold window, so be ready to schedule a pickup right away! | ||
| </div> | ||
| <% end %> |
Member
There was a problem hiding this comment.
Good call adding these notices for members!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Adds an optional
hold_durationfield to items, letting staff set how long a member has to pick up a held item. Items without a custom duration keep the existing 7-day behavior. Items with a shorter duration (like 1 day) expire at the end of the next day the library is open, calculated using the library's event calendar.Member-facing messaging updates throughout: item detail page, hold placement, holds index sidebar, and the holds-available email all conditionally explain the shorter window in a friendly way.
Why it is important
Librarians need a way to keep high-demand seasonal items (tillers, weed whackers, etc.) circulating faster. The only options today are a 7-day hold or disabling holds entirely, and disabling holds leads to members calling the library for informal holds, which is harder for everyone.
UI Change Screenshot
Admin: hold duration dropdown on item edit
Member: placing a hold on a short-hold item
Member: item already on hold, ready for pickup
Holds sidebar: new bullet about popular items
Implementation notes
hold_durationis a nullable integer onitems.nilmeans "use the default (7 calendar days)." A value like1means "1 day, landing on the next open day."hold_duration, expiration is calculated viaEvent.next_open_dayso holds don't expire on days the library is closed. The default path is unchanged to avoid any behavioral surprises for existing items.Closes #2115