1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'
However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.
And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.
This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.
2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.
With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.
I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.
This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.
1. Ensure in your circulation rules that 'Item level holds' is enabled
2. Apply all patches on this bug report except this commit
3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.
4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.
6. Apply this patch
7. Restart memcached, and plack
8. In the staff client remove the reservation you placed from the staff
9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.
10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.
11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.
12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.
i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.