Skip to content
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

holds/new form throws an error when record has no holdables items #237

Closed
banukutlu opened this issue Aug 26, 2020 · 7 comments
Closed

holds/new form throws an error when record has no holdables items #237

banukutlu opened this issue Aug 26, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@banukutlu
Copy link
Contributor

banukutlu commented Aug 26, 2020

try /holds/new?catkey=19200019

Screen Shot 2020-08-25 at 4 21 32 PM

@banukutlu banukutlu added the bug Something isn't working label Aug 26, 2020
@banukutlu banukutlu self-assigned this Aug 26, 2020
@banukutlu
Copy link
Contributor Author

banukutlu commented Aug 26, 2020

some notes from debugging this record:

currentLocations on this catkey are CHECKEDOUT, STACKS-BD, STACKS-HB3
CHECKEDOUT not holdable anyway
STACKS-BD, STACKS-HB3 are not returning back from find_holdable_locations even though this catkey has IWantIt and availability returns holdable

locations returned from policy call includes these locations as not holdable
"fields"=>{"displayName"=>"STACKS-HB3", "holdable"=>false}
"fields"=>{"displayName"=>"STACKS-BD", "holdable"=>false}
so result of that is no holdable items.

We should probably catch this case rather than 500
but also interesting that these locations comes back as not holdable, so is the record holdable or not?

@banukutlu
Copy link
Contributor Author

Update: these locations were updated as holdable but cache needed to be cleared and server needed to be restarted on the sirsi side, after Maryam doing that, now those two locations shows up holdable.

Also, added a fix for it to not error out in this case.

@cdmo
Copy link
Contributor

cdmo commented Aug 28, 2020

I'm going to reopen this because I don't think it passed. Please correct me if I'm wrong.

@cdmo cdmo reopened this Aug 28, 2020
@ruthtillman
Copy link
Collaborator

I QAd this one. I got the item itself to work successfully but when attempting other items which shouldn't be put on hold at all (just as an edge case), it didn't do anything. Should redirect to my acct home I believe.

@cdmo
Copy link
Contributor

cdmo commented Aug 28, 2020

Ok cool. Just wasn't sure. Thanks.

@cdmo cdmo closed this as completed Aug 28, 2020
@banukutlu banukutlu reopened this Aug 28, 2020
@banukutlu banukutlu changed the title holds/new form for 19200019 throws an error holds/new form throws an error when record has no holdables items Aug 28, 2020
@banukutlu
Copy link
Contributor Author

reopened to add a message Sorry! You cannot place a hold on this item. Contact your library if you need assistance for records that are not holdable eg. catkey: 31200756

@ruthtillman
Copy link
Collaborator

Tested with both online item and item which doesn't exist. Successful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants