Bug 22899: Add pending_hold method to Koha::Item
authorNick Clemens <nick@bywatersolutions.com>
Mon, 13 May 2019 20:09:05 +0000 (20:09 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 24 May 2019 13:34:23 +0000 (14:34 +0100)
commit8e4ea14f93075a10a4ed995d6533e425e70b4039
tree3c902b862915e4cb2653daab83bea488827d22c4
parent551fc90f2e5234f5d076f73570809f7266ebc623
Bug 22899: Add pending_hold method to Koha::Item

To test:
 1 - Enable course reserves
 2 - Create a course
 3 - Add an item to the course
 4 - Attempt to view the course on the OPAC
 5 - Internal Server Error
 6 - Apply patch
 7 - Add an item to the holds queue by placing a hold and  running holds queue builder or:
     INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###);
 8 - View the course page, note item appears 'Pending hold'
 9 - Remove the holdsqueue line
10 - View the course page, note item appears 'Available'
11 - prove -v t/db_dependent/Koha/Item.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
I see Jonathan's comments about small improvements, but will sign off as
everything works as expected here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f21ebad7d298f25e44771e5833d1d1d4d6d8f777)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Item.pm
t/db_dependent/Koha/Item.t [new file with mode: 0644]