Bug 19532 - Recalls for Koha
Summary: Recalls for Koha
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P3 new feature with 11 votes (vote)
Deadline: 2017-12-01
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Whiteboard:
Keywords: Manual
Depends on:
Blocks:
 
Reported: 2017-10-25 23:27 UTC by Liz Rea
Modified: 2018-11-16 06:11 UTC (History)
20 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
This new feature introduces the ability for borrowers to place a recall on an item from the OPAC detail. Borrowers can see details of their requested recalls in the OPAC and can cancel the recall before it is returned. Librarians can view and administer the recalls in the Circulation interface of the staff client which displays a list of recalls, overdue recalls and recalls awaiting pickup. The amount of time the recalled item has to be returned and the amount of time it will wait for pickup can be set in circulation and fine rules in the unit of hours or days. After an item is recalled it cannot be renewed. When the item is returned the recall can be confirmed or cancelled. Recalls are marked as overdue by the overdue_notices.pl cronjob.


Attachments
Bug 19532: Database updates (12.02 KB, patch)
2017-10-25 23:46 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (6.42 KB, patch)
2017-10-26 01:02 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (6.99 KB, patch)
2017-10-26 01:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.49 KB, patch)
2017-10-26 01:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.58 KB, patch)
2017-10-26 21:25 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (6.16 KB, patch)
2017-10-26 21:32 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.55 KB, patch)
2017-10-26 21:42 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.83 KB, patch)
2017-10-26 21:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Circulation rules (8.52 KB, patch)
2017-10-27 03:07 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.09 KB, patch)
2017-11-13 01:26 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.67 KB, patch)
2017-11-13 02:36 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.81 KB, patch)
2017-11-14 21:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (12.44 KB, patch)
2017-11-14 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: recalls history (22.52 KB, patch)
2017-11-15 01:16 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls queue (15.29 KB, patch)
2017-11-15 22:27 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.45 KB, patch)
2017-11-16 00:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.27 KB, patch)
2017-11-19 22:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.79 KB, patch)
2017-11-20 00:51 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (22.35 KB, patch)
2017-11-20 02:35 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (6.99 KB, patch)
2017-11-24 00:55 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.87 KB, patch)
2017-11-27 00:51 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.30 KB, patch)
2017-11-27 01:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.02 KB, patch)
2017-11-27 22:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.56 KB, patch)
2017-11-28 01:39 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.71 KB, patch)
2017-11-28 04:10 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (943 bytes, patch)
2017-11-28 04:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Fixing merge conflicts etc (1.09 KB, patch)
2017-12-18 03:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (997 bytes, patch)
2017-12-19 01:32 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Circulation rules (8.58 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.09 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.67 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.81 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (12.44 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: recalls history (22.52 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls queue (15.29 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.45 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.27 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.79 KB, patch)
2017-12-19 01:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (22.35 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (6.96 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.87 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.30 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.02 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.56 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.71 KB, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (997 bytes, patch)
2017-12-19 01:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.42 KB, patch)
2017-12-21 03:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.31 KB, patch)
2017-12-22 01:03 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (5.28 KB, patch)
2018-02-12 02:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.96 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (12.44 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: recalls history (22.52 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls queue (15.29 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.45 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.27 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.79 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (22.35 KB, patch)
2018-02-13 22:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (6.96 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.87 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.30 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.02 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.56 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.71 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (997 bytes, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.42 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.50 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (5.28 KB, patch)
2018-02-13 22:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (38.09 KB, patch)
2018-02-13 22:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (31.23 KB, patch)
2018-02-26 21:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Database updates (12.08 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.55 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.61 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.88 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Circulation rules (8.51 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.15 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.72 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (15.15 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (12.50 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: recalls history (22.58 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Recalls queue (15.34 KB, patch)
2018-03-01 16:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.51 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.32 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.84 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (22.07 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.02 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.92 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.36 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.07 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.61 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.03 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.48 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.56 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (38.14 KB, patch)
2018-03-01 16:01 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (31.31 KB, patch)
2018-03-01 16:02 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-03-01 16:02 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.17 KB, patch)
2018-03-01 16:02 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.18 KB, patch)
2018-03-08 02:10 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19532: Database updates (12.08 KB, patch)
2018-07-10 22:31 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.55 KB, patch)
2018-07-10 22:32 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.61 KB, patch)
2018-07-10 22:33 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.88 KB, patch)
2018-07-10 22:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Circulation rules (8.09 KB, patch)
2018-07-10 22:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.15 KB, patch)
2018-07-10 22:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.36 KB, patch)
2018-07-10 22:37 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.43 KB, patch)
2018-07-10 22:38 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (11.75 KB, patch)
2018-07-10 22:40 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: recalls history (22.33 KB, patch)
2018-07-10 22:41 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls queue (14.54 KB, patch)
2018-07-10 22:42 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.51 KB, patch)
2018-07-10 22:43 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.32 KB, patch)
2018-07-10 22:44 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.80 KB, patch)
2018-07-10 22:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (21.58 KB, patch)
2018-07-10 22:48 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.02 KB, patch)
2018-07-10 22:49 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.92 KB, patch)
2018-07-10 22:51 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.36 KB, patch)
2018-07-10 23:15 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.07 KB, patch)
2018-07-10 23:16 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.61 KB, patch)
2018-07-10 23:18 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-07-10 23:19 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.10 KB, patch)
2018-07-10 23:20 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.40 KB, patch)
2018-07-10 23:21 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.04 KB, patch)
2018-07-10 23:22 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (38.14 KB, patch)
2018-07-10 23:23 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.92 KB, patch)
2018-07-10 23:25 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-07-10 23:26 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.11 KB, patch)
2018-07-10 23:32 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly (11.13 KB, patch)
2018-07-10 23:34 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Recalls for Course Reserves. (2.55 KB, patch)
2018-07-10 23:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty (1.44 KB, patch)
2018-07-10 23:37 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester. (5.78 KB, patch)
2018-07-23 04:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester (3.23 KB, patch)
2018-07-23 04:24 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup (12.04 KB, patch)
2018-07-23 05:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Database updates (12.10 KB, patch)
2018-09-14 22:22 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.58 KB, patch)
2018-09-14 22:22 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.62 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.91 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Circulation rules (8.11 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.18 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.85 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.25 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (11.75 KB, patch)
2018-09-14 22:23 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: recalls history (22.41 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Recalls queue (14.58 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.54 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.35 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.86 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (21.74 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.02 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.93 KB, patch)
2018-09-14 22:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.37 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.10 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.62 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.11 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.47 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.11 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (27.28 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.61 KB, patch)
2018-09-14 22:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.19 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly (11.19 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Recalls for Course Reserves. (2.49 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty (1.44 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester. (5.84 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester (3.25 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup (11.94 KB, patch)
2018-09-14 22:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (20.12 KB, patch)
2018-10-17 23:01 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.00 KB, patch)
2018-10-17 23:02 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.92 KB, patch)
2018-10-17 23:02 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.36 KB, patch)
2018-10-17 23:03 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.07 KB, patch)
2018-10-17 23:03 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.61 KB, patch)
2018-10-17 23:04 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-10-17 23:04 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.02 KB, patch)
2018-10-17 23:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.40 KB, patch)
2018-10-17 23:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.05 KB, patch)
2018-10-17 23:06 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (40.37 KB, patch)
2018-10-17 23:06 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.48 KB, patch)
2018-10-17 23:07 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-10-17 23:07 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.08 KB, patch)
2018-10-17 23:08 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly (10.50 KB, patch)
2018-10-17 23:08 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Recalls for Course Reserves. (2.48 KB, patch)
2018-10-17 23:09 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty (1.43 KB, patch)
2018-10-17 23:09 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester. (5.82 KB, patch)
2018-10-17 23:09 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester (3.23 KB, patch)
2018-10-17 23:10 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup (11.91 KB, patch)
2018-10-17 23:11 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixing Internal Server Error thrown on C4/Circulation.pm (589 bytes, patch)
2018-10-18 01:45 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Implemented check if recall status equals 'R' before recall popup is shown (1.43 KB, patch)
2018-10-18 01:45 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Added conditional to check the recall has a status = 'W' before setting it to closed (1.33 KB, patch)
2018-10-18 01:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixed display of recall buttons on opac-course-details.pl (2.59 KB, patch)
2018-10-18 01:47 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Stopping recalls awaiting pickup to be issued to patrons other than the patron who recalled. (1.88 KB, patch)
2018-10-18 01:47 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Amended the detail.pl call to retrieve recalls so now it retrieves recalls with the status of 'R' or 'W' (1.41 KB, patch)
2018-10-18 01:48 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Stopping recalled items (recall status='R') from being renewed (2.36 KB, patch)
2018-10-18 01:48 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixed Internal Server error thrown upon returning recalled item (1.21 KB, patch)
2018-10-18 03:29 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fix t/db_dependent/Koha/Recalls.t (1.50 KB, patch)
2018-10-18 20:54 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Circulation rules (7.74 KB, patch)
2018-10-25 22:25 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.15 KB, patch)
2018-10-25 22:26 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.83 KB, patch)
2018-10-25 22:27 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.20 KB, patch)
2018-10-25 22:28 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (11.75 KB, patch)
2018-10-25 22:29 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: recalls history (22.34 KB, patch)
2018-10-25 22:29 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls queue (14.54 KB, patch)
2018-10-25 22:30 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.51 KB, patch)
2018-10-25 22:30 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.32 KB, patch)
2018-10-25 22:30 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.83 KB, patch)
2018-10-25 22:31 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (20.12 KB, patch)
2018-10-25 22:31 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.00 KB, patch)
2018-10-25 22:32 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.92 KB, patch)
2018-10-25 22:32 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.36 KB, patch)
2018-10-25 22:33 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.07 KB, patch)
2018-10-25 22:33 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.61 KB, patch)
2018-10-25 22:34 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-10-25 22:34 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.02 KB, patch)
2018-10-25 22:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.40 KB, patch)
2018-10-25 22:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.05 KB, patch)
2018-10-25 22:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (39.70 KB, patch)
2018-10-25 22:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.48 KB, patch)
2018-10-25 22:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-10-25 22:37 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.08 KB, patch)
2018-10-25 22:37 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly (10.50 KB, patch)
2018-10-25 22:38 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Recalls for Course Reserves. (2.48 KB, patch)
2018-10-25 22:38 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty (1.43 KB, patch)
2018-10-25 22:39 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester. (5.82 KB, patch)
2018-10-25 22:39 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester (3.23 KB, patch)
2018-10-25 22:39 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup (11.91 KB, patch)
2018-10-25 22:40 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixing Internal Server Error thrown on C4/Circulation.pm (589 bytes, patch)
2018-10-25 22:40 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Implemented check if recall status equals 'R' before recall popup is shown (1.43 KB, patch)
2018-10-25 22:41 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Added conditional to check the recall has a status = 'W' before setting it to closed (1.33 KB, patch)
2018-10-25 22:41 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixed display of recall buttons on opac-course-details.pl (2.59 KB, patch)
2018-10-25 22:42 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Stopping recalls awaiting pickup to be issued to patrons other than the patron who recalled. (1.88 KB, patch)
2018-10-25 22:42 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Amended the detail.pl call to retrieve recalls so now it retrieves recalls with the status of 'R' or 'W' (1.41 KB, patch)
2018-10-25 22:43 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Stopping recalled items (recall status='R') from being renewed (2.36 KB, patch)
2018-10-25 22:43 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixed Internal Server error thrown upon returning recalled item (1.21 KB, patch)
2018-10-25 22:44 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fix t/db_dependent/Koha/Recalls.t (1.50 KB, patch)
2018-10-25 22:44 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Stop item status='Available' for waiting recalls (5.28 KB, patch)
2018-10-25 22:45 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Amended C4/Circulation->CanBookBeIssued() (5.42 KB, patch)
2018-10-25 22:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixed missing variable declaration error (1.08 KB, patch)
2018-10-25 22:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Added missing conditional check so now item availability for recalled items on OPAC search results page is corrected (1.39 KB, patch)
2018-10-25 22:47 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Added ability to set Recall due date interval, and Recall pickup period to hours (7.03 KB, patch)
2018-10-25 23:07 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Database updates (12.08 KB, patch)
2018-10-29 20:54 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.55 KB, patch)
2018-10-29 20:56 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.61 KB, patch)
2018-10-29 20:56 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.88 KB, patch)
2018-10-29 20:57 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Circulation rules (7.74 KB, patch)
2018-10-29 20:58 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.15 KB, patch)
2018-10-29 20:59 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.83 KB, patch)
2018-10-29 21:00 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.20 KB, patch)
2018-10-29 21:00 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (11.75 KB, patch)
2018-10-29 21:01 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: recalls history (22.34 KB, patch)
2018-10-29 21:02 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls queue (14.54 KB, patch)
2018-10-29 21:02 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.51 KB, patch)
2018-10-29 21:03 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.32 KB, patch)
2018-10-29 21:03 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.83 KB, patch)
2018-10-29 21:04 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (20.12 KB, patch)
2018-10-29 21:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.00 KB, patch)
2018-10-29 21:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.92 KB, patch)
2018-10-29 21:07 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.36 KB, patch)
2018-10-29 21:08 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.07 KB, patch)
2018-10-29 21:09 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.61 KB, patch)
2018-10-29 21:09 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.77 KB, patch)
2018-10-29 21:12 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.02 KB, patch)
2018-10-29 21:13 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.40 KB, patch)
2018-10-29 21:13 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.05 KB, patch)
2018-10-29 21:34 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (39.70 KB, patch)
2018-10-29 21:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.48 KB, patch)
2018-10-29 21:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-10-29 21:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532 - Improve and refine recalls functionality (25.08 KB, patch)
2018-10-29 21:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixes and enhancements to recalls (49.10 KB, patch)
2018-10-29 21:36 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: Fixes and enhancements to recalls (45.77 KB, patch)
2018-10-29 22:05 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19532: (QA followup) Add missing TT filters (60.31 KB, patch)
2018-10-30 12:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Database updates (12.22 KB, patch)
2018-10-31 07:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Module files for Recall and OldRecall (16.56 KB, patch)
2018-10-31 07:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Some DB fixes (5.61 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Some module fixes (9.90 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Circulation rules (7.73 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Recall an item in OPAC (10.15 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Cancel recall and see recalls in OPAC (12.83 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Show recalls on intranet side (14.20 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Fixing broken OPAC recalls table (11.75 KB, patch)
2018-10-31 07:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: recalls history (22.34 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Recalls queue (14.54 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Overdue recalls report (12.51 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Recalls awaiting pickup report (15.36 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Only recall items checked out by other users (4.85 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: UseRecalls syspref (20.16 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Recall pop up when checking in an item (7.00 KB, patch)
2018-10-31 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Send notice to user to return a recalled item (1.93 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Send notice to user to pickup recalled returned item (3.37 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Flagging recall as 'old' when expired or cancelled (3.10 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Cronjob to check for overdue recalls (2.62 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Tests for Koha/Recalls (3.76 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Nice message if no recalls for opac recalls history (1.03 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: POD fix, renaming methods (13.38 KB, patch)
2018-10-31 07:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Extra fixes (15.03 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Notices for recalls (39.68 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Extra fixes from Comment 68 (30.61 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: (follow-up) Update characterset for recalls table (1.34 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Improve and refine recalls functionality (25.09 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: Fixes and enhancements to recalls (45.79 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: (QA follow-up) Add missing TT filters (60.31 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: (QA follow-up) Use Asset plugin for css (3.46 KB, patch)
2018-10-31 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19532: (QA follow-up) Fix collation in kohastructure.sql (1.21 KB, patch)
2018-10-31 07:25 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2017-10-25 23:27:56 UTC
Preface: 

I know this will be quite an interesting feature for lots of people. Catalyst is doing a working proof of concept for this feature. The requirements we have given to Aleisha are firm, and we will not be scope creeping them. Additional features are welcome once this initial development is either accepted or supplanted by something else.

That said, we welcome comment and suggestions on the patches we will attach here, and view this as a starting point instead of a complete solution.

Expected scope of the feature to include: 

- Ability for borrowers to place a recall on a book from the OPAC results and detail, if it is checked out (question, do we offer to issue a recall if only one copy of say 3 is checked out?)

- Ability for borrowers to see their requested recalls, and the when the book is expected to be returned back

- An interface similar to holds for recalls, that alerts librarians that a book needs to go on the recall shelf (Recall for User, confirm or cancel) 

- An interface similar to holds waiting to show recalls that are currently on the shelf, and recalls that are requested but overdue, and ones that have expired and need to be reshelved.

- A view in the intranet user interface for librarians to see a borrower's recalls (similar to holds)

- Notices for borrower who has the recalled book on issue, to notify that the book's due date has changed and for the recaller, to let them know when the recalled item is ready for pick up.

- Something in the circ rules that defines whether an item type/borrower category is allowed to place recalls on an item.

- Sysprefs for "days from now that item is now due" and "how long do I let this recall languish on the recall shelf before reshelving"

Current implementation notes:

* DB: recalls table
• DB: old_recalls table

• notices: to user who has an item checked out that a recall request has been placed on, saying request has been made and due date has been updated (may use or build upon existing code from 17509)
• notices: to user who made the recall request when it has been checked in, saying the item is awaiting pickup and must be picked up within X days (may use or build upon existing code from 17509)

• OPAC: in checked out tab on user summary page, show your item has a recall placed on it, highlighting the new due date
• OPAC: recall button under availability on record detail page and results page
• OPAC: recalls tab on user summary page

Per item type/borrower category combination:
• circ rules: recall due date interval - what is the new due date of the item being recalled? How many days from the date of recall do we set the new due date?
• circ rules: recall overdue fine - Do we have a special fine on an item that was recalled but not returned on time? (this may be a phase two feature)
• circ rules: recall shelf time (how long can it be awaiting pickup before it needs to be reshelved)
• circ rules OR syspref: do recalls automatically expire? (this may be a phase two feature)

• circ reports: overdue recalls 
• circ reports: recalls awaiting pickup / recalls waiting over X days
• circ reports: recalls queue

• intranet: recalls tab on member detail page, showing recalls that the borrower has requested. 
• intranet: highlight on checkout and detail page items with a recall due date.
• intranet: alert when checking in an item with a recall
Comment 1 Aleisha Amohia 2017-10-25 23:46:00 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2017-10-26 01:02:19 UTC Comment hidden (obsolete)
Comment 3 Aleisha Amohia 2017-10-26 01:04:52 UTC
Created attachment 68571 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table
Comment 4 Aleisha Amohia 2017-10-26 01:06:54 UTC
Created attachment 68572 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.
Comment 5 Jonathan Druart 2017-10-26 13:30:47 UTC
(In reply to Liz Rea from comment #0)
> Current implementation notes:
> 
> * DB: recalls table
> • DB: old_recalls table

Regarding the number of critical issues we had the last few months, I do not think it is a good idea to reuse this pattern.
We should not move data from one table to another but add a deleted/old flag instead.
Comment 6 Aleisha Amohia 2017-10-26 21:25:10 UTC Comment hidden (obsolete)
Comment 7 Aleisha Amohia 2017-10-26 21:32:32 UTC Comment hidden (obsolete)
Comment 8 Aleisha Amohia 2017-10-26 21:42:55 UTC
Created attachment 68644 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column
Comment 9 Aleisha Amohia 2017-10-26 21:45:26 UTC
Created attachment 68645 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall
Comment 10 Aleisha Amohia 2017-10-27 03:07:44 UTC
Created attachment 68653 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time
Comment 11 Aleisha Amohia 2017-11-13 01:26:12 UTC
Created attachment 69100 [details] [review]
Bug 19532: Recall an item in OPAC

This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason
Comment 12 Aleisha Amohia 2017-11-13 02:36:39 UTC
Created attachment 69102 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary
Comment 13 Aleisha Amohia 2017-11-14 21:56:42 UTC
Created attachment 69147 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.
Comment 14 Aleisha Amohia 2017-11-14 22:01:21 UTC
Created attachment 69148 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>
Comment 15 Aleisha Amohia 2017-11-15 01:16:09 UTC
Created attachment 69149 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes
Comment 16 Aleisha Amohia 2017-11-15 22:27:20 UTC
Created attachment 69170 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.
Comment 17 Aleisha Amohia 2017-11-16 00:56:25 UTC
Created attachment 69172 [details] [review]
Bug 19532: Overdue recalls report
Comment 18 Aleisha Amohia 2017-11-19 22:24:32 UTC
Created attachment 69221 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls
Comment 19 Aleisha Amohia 2017-11-20 00:51:51 UTC
Created attachment 69222 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.
Comment 20 Aleisha Amohia 2017-11-20 02:35:12 UTC
Created attachment 69223 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl
Comment 21 Aleisha Amohia 2017-11-24 00:55:00 UTC
Created attachment 69322 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.
Comment 22 Aleisha Amohia 2017-11-27 00:51:50 UTC
Created attachment 69353 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.
Comment 23 Aleisha Amohia 2017-11-27 01:21:08 UTC
Created attachment 69354 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.
Comment 24 Aleisha Amohia 2017-11-27 22:21:55 UTC
Created attachment 69405 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall
Comment 25 Aleisha Amohia 2017-11-28 01:39:14 UTC
Created attachment 69409 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)
Comment 26 Aleisha Amohia 2017-11-28 04:10:22 UTC
Created attachment 69410 [details] [review]
Bug 19532: Tests for Koha/Recalls
Comment 27 Aleisha Amohia 2017-11-28 04:21:27 UTC
Created attachment 69411 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history
Comment 28 Aleisha Amohia 2017-11-28 04:38:46 UTC
I believe that this feature is now ready to test. I'll be away for the next couple of weeks, but feel free to test and leave any feedback/comments/questions/ideas that I can come back to when I return.
Note: when testing, it will be very helpful to keep the OPAC and the Staff Client open in 2 separate tabs or browsers. you will also need 2 borrowers, where at least one has superlibrarian privileges.

TEST PLAN:

1. Enable the UseRecalls syspref
2. Go to Circulation and Fines Rules. Put some numbers in the recalls fields (recall due date interval, recall overdue fine amount, recall pickup period)
3. Put a number in the RecallsMaxPickUpDelay syspref. This will be the default number of days used if the recall pickup period isn't set in Step 2
4. Check out an item to a patron
5. Go to that item's detail page in the OPAC. Notice the holdings table says 'Checked out'
6. Log in to the OPAC with another patron and go back to that detail page. The holdings table should now have a Recall link next to the 'Checked out' text
7. Click the Recall button and confirm the Recall
8. Go to the user's opac summary and confirm there is now a Recalls tab, with the correct number of recalls (should be 1).
9. Test cancelling the recall by clicking Cancel. Confirm the recall has been cancelled. Repeat steps 6 and 7.
10. In the left navigation, there will also be a 'recalls history' tab. Click it. There should be a log, similar to reading history, with the cancelled recall and the new recall in it. Confirm all information is correct
11. Again, test cancelling the recall. Repeat steps 6 and 7.
12. In the staff interface, go to the logged in user's checkouts. Confirm you can see a new Recalls tab, with the active (not cancelled) recall in the table. Should be the same for the details tab also.
13. Test cancelling works for both of these again, and making new recalls again.
14. Check in the recalled item. You should see a pop up, asking to confirm the recall as waiting. Click confirm.
15. Go to the Circulation main page. You should see 3 new reports: recalls queue, overdue recalls and recalls awaiting pickup
16. Go to the recalls queue, confirm you can see an entire history of recalls at your library. Confirm cancel works when selecting checkboxes and clicking the multiple button. If you do this, you'll need to place the recall again and check the item in again
17. Go to recalls awaiting pickup. You should see the recall under the recalls waiting tab
18. in Mysql, set the waitingdate for your recall to be more than 'recall pickup period' days before today's date
19. Refresh the recalls awaiting pickup page. You should see the recall under the recalls waiting tab, and the recalls waiting more than X days tab.
20. expire the recall. confirm this is expired by checking the recalls queue
21. place another recall, but do not check it in
22. in mysql, set the date_due of the checkout (issues table) to be at least 'recall due date interval' number of days before today's date
23. run the overdue_notices.pl cronjob
24. go to the overdue recalls circ report and confirm your recall shows there
25. try cancelling the recall here also
26. in mysql, check the message_queue and confirm there have been the appropriate number of RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM notices sent with the correct to and from addresses and other content
27. test t/db_dependent/Koha/Recalls.t
Comment 29 Petter Goksøyr Åsen 2017-11-28 07:13:39 UTC
Quick comment:
Given the troubles we have with duplicate primary keys in old/deleted tables, would't it be better to drop the old_recalls table, and keep it in one table, with a flag denoting if the recall is deleted or not?
Comment 30 Jonathan Druart 2017-11-28 12:53:18 UTC
(In reply to Petter Goksøyr Åsen from comment #29)
> Quick comment:
> Given the troubles we have with duplicate primary keys in old/deleted
> tables, would't it be better to drop the old_recalls table, and keep it in
> one table, with a flag denoting if the recall is deleted or not?

Yes, see comment 5 as well.
Aleisha, did you consider this alternative?
Comment 31 Chris Cormack 2017-11-28 20:35:51 UTC
(In reply to Jonathan Druart from comment #30)
> (In reply to Petter Goksøyr Åsen from comment #29)
> > Quick comment:
> > Given the troubles we have with duplicate primary keys in old/deleted
> > tables, would't it be better to drop the old_recalls table, and keep it in
> > one table, with a flag denoting if the recall is deleted or not?
> 
> Yes, see comment 5 as well.
> Aleisha, did you consider this alternative?

We did, but the reason old_issues exists, is because keeping it one massive table becomes really slow quite fast.

With recalls this probably will take longer to be a problem, but having circulation stuff slowed down (specifically returns) by having millions of rows to check through was the reason the issues table was split in the first place.
I don't believe one table that grows forever for circulation is a viable fix.
Comment 32 Petter Goksøyr Åsen 2017-11-29 06:14:04 UTC
Fair enough, but optimizing by allowing for potential data corruption seems the wrong way to optimize to me :)

Isn't data integrity is more important?
Comment 33 Chris Cormack 2017-11-29 06:18:24 UTC
(In reply to Petter Goksøyr Åsen from comment #32)
> Fair enough, but optimizing by allowing for potential data corruption seems
> the wrong way to optimize to me :)
> 
> Isn't data integrity is more important?

It was fine for 15 years, until mysql changed things. And after that we didn't have any data loss until we rushed a fix.
A combined table is not a valid fix, you can have all the data integrity you want if the system is too slow to use. We should come up with an actual solution.
Comment 34 Petter Goksøyr Åsen 2017-11-29 06:23:39 UTC
Yeah, this probably needs a broader discussion, best handeled elsewhere. I'll leave it for now and let this bug be about recalls :)
Comment 35 Tomás Cohen Arazi 2017-11-29 17:56:02 UTC
Comment on attachment 68572 [details] [review]
Bug 19532: Module files for Recall and OldRecall

>Koha/Recall.pm
>Koha/Recalls.pm
>Koha/Old/Recall.pm
>Koha/Old/Recalls.pm
>and the schema files for Recall and OldRecall.

I agree we should avoid old_*, probably index definitions are relevant for performance (speed, because they will eat more hard disk space of course).

>+=head2 Class Methods

This are usually labeled 'Internal methods', to distinguish them from public 'Class methods'. Fix the case.

>+=head3 type
>+
>+=cut
>+
>+sub type {
>+    return 'OldRecall';
>+}

This should be called '_type'. Look at Koha/Object.pm:260, a sample place it is used. If it is not well documented, please file a bug for it!

>+=head2 found
>+
>+  data_type: 'varchar'
>+  is_nullable: 1
>+  size: 1

Please use tinyint(1) for booleans. While it is not a real type (it is an integer with a mask), it clearly denotes its use. If you plan to expose this through the api, having it be VARCHAR will make our stack consider it a string. If you set it a numeric type, then we can add:

__PACKAGE_->add_columns({

  '+found' => { is_boolean => 1 }

});

to the schema file, and thus it is considered a Boolean when rendering on the API.
Comment 36 Tomás Cohen Arazi 2017-11-29 18:00:16 UTC
Comment on attachment 69102 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC


>+=head3 branch
>+
>+Returns the related Koha::Library object for this Hold
>+
>+=cut
>+
>+sub branch {
>+    my ($self) = @_;
>+
>+    $self->{_branch} ||= Koha::Libraries->find( $self->branchcode() );
>+
>+    return $self->{_branch};
>+}

Please call this method 'library' instead, and 'patron' instead of 'borrower' on the followup.
Comment 37 Liz Rea 2017-11-30 03:08:44 UTC
These are functionality notes for Aleisha

OPAC client view:

We probably want to show the borrower when the book is now expected to be returned by on /cgi-bin/koha/opac-recalls.pl

Staff views:

- syspref needs to be defaulted to off please :)

/cgi-bin/koha/circ/recalls_queue.pl
- probably want to see the new due date here as well

/cgi-bin/koha/catalogue/detail.pl?biblionumber=16
- do we want to see what the old due date was here? (to think about, not required)
- Probably want to show somewhere in the item table that there is a recall, and for whom (kinda like we do with holds)
- do we want a tab on the detail page that shows all of the recalls for this biblio, and who they are for?

General questions: 

- If we add an item with the same item type to a biblio that has a recall, should checking in this newly available item trigger the recall to be filled?

I'm out of time for this run at it, but honestly what a great first whack at it.
Comment 38 Owen Leonard 2017-11-30 19:48:06 UTC
I can't get this to apply!

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 19532: Database updates
Applying: Bug 19532: Notices for recalls
Applying: Bug 19532: Module files for Recall and OldRecall
Applying: Bug 19532: Some DB fixes
Applying: Bug 19532: Some module fixes
Applying: Bug 19532: Circulation rules
fatal: sha1 information is lacking or useless (Koha/Schema/Result/Issuingrule.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
Comment 39 Liz Rea 2017-11-30 21:38:05 UTC
Hi Owen,

This patch: 
 Bug 19532: Circulation rules (8.52 KB, patch) 

Is out of band and doesn't work properly. We did some heroics at Catalyst because we needed to do some testing on this bug, but that patch will need to be fixed by Aleisha.

Cheers,
Liz
Comment 40 Liz Rea 2017-11-30 21:39:00 UTC
(Basically, if you skip that one, the rest will apply. Then you just have to sort out what the bad patch was trying to do, and add that back in.)
Comment 41 Kyle M Hall 2017-12-11 18:32:39 UTC
> We did, but the reason old_issues exists, is because keeping it one massive
> table becomes really slow quite fast.

I think maybe we need to check our assumptions. We may have be running on best practices that are out of date. I think that happens to us all from time to time.

MySQL is capable of dealing with tens or even hundreds of millions of rows very speedily, as long as the correct indexes are in place.

For example, I picked out a database to test with from a Koha consortium. They have  1,456,666 old_issues rows, and 50122 issues rows.

Searching on a column with no index ( such as issuedate ) returned a single record from almost 1.5 million records in 1.04 seconds. Not terrible, but definitely not great. However, searching for the same row using an indexed column took less time than mysql could measure! It reported back taking 0.00 seconds ; )

I've done some digging and it appears that many people are using mysql for tables with tens to hundreds of millions of rows with no adverse effects.

Perhaps that was an issue during the early years of Koha, when MySQL was much less mature, but I don't think it is anymore.
Comment 42 Tomás Cohen Arazi 2017-12-11 18:41:15 UTC
(In reply to Kyle M Hall from comment #41)
> > We did, but the reason old_issues exists, is because keeping it one massive
> > table becomes really slow quite fast.
> 
> I think maybe we need to check our assumptions. We may have be running on
> best practices that are out of date. I think that happens to us all from
> time to time.
> 
> MySQL is capable of dealing with tens or even hundreds of millions of rows
> very speedily, as long as the correct indexes are in place.
> 
> For example, I picked out a database to test with from a Koha consortium.
> They have  1,456,666 old_issues rows, and 50122 issues rows.
> 
> Searching on a column with no index ( such as issuedate ) returned a single
> record from almost 1.5 million records in 1.04 seconds. Not terrible, but
> definitely not great. However, searching for the same row using an indexed
> column took less time than mysql could measure! It reported back taking 0.00
> seconds ; )
> 
> I've done some digging and it appears that many people are using mysql for
> tables with tens to hundreds of millions of rows with no adverse effects.
> 
> Perhaps that was an issue during the early years of Koha, when MySQL was
> much less mature, but I don't think it is anymore.

I think this was introduced at some point to ease the use of TRUNCATE as opposed to DELETE when wiping old data.

There are other ways to deal with fragmentation already (OPTIMIZE?), so I'd suggest the tables are joined and a proper use of tinyint for the flags.
Comment 43 Aleisha Amohia 2017-12-14 23:00:57 UTC
Hi all, sorry for the delay in getting back to you, I've been away.

I removed the old_recalls table and added an 'old' flag to the recalls table in the 'Some DB fixes' patch.

I'll now get on to fixing all of the other comments.
Comment 44 Aleisha Amohia 2017-12-18 03:04:01 UTC
Created attachment 69841 [details] [review]
Bug 19532: Fixing merge conflicts etc
Comment 45 Aleisha Amohia 2017-12-19 01:32:36 UTC
Created attachment 69872 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523
Comment 46 Aleisha Amohia 2017-12-19 01:44:01 UTC
Created attachment 69873 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time
Comment 47 Aleisha Amohia 2017-12-19 01:44:07 UTC
Created attachment 69874 [details] [review]
Bug 19532: Recall an item in OPAC

This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason
Comment 48 Aleisha Amohia 2017-12-19 01:44:14 UTC
Created attachment 69875 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary
Comment 49 Aleisha Amohia 2017-12-19 01:44:20 UTC
Created attachment 69876 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.
Comment 50 Aleisha Amohia 2017-12-19 01:44:26 UTC
Created attachment 69877 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>
Comment 51 Aleisha Amohia 2017-12-19 01:44:32 UTC
Created attachment 69878 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes
Comment 52 Aleisha Amohia 2017-12-19 01:44:38 UTC
Created attachment 69879 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.
Comment 53 Aleisha Amohia 2017-12-19 01:44:46 UTC
Created attachment 69880 [details] [review]
Bug 19532: Overdue recalls report
Comment 54 Aleisha Amohia 2017-12-19 01:44:52 UTC
Created attachment 69881 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls
Comment 55 Aleisha Amohia 2017-12-19 01:44:58 UTC
Created attachment 69882 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.
Comment 56 Aleisha Amohia 2017-12-19 01:45:03 UTC
Created attachment 69883 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl
Comment 57 Aleisha Amohia 2017-12-19 01:45:09 UTC
Created attachment 69884 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.
Comment 58 Aleisha Amohia 2017-12-19 01:45:15 UTC
Created attachment 69885 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.
Comment 59 Aleisha Amohia 2017-12-19 01:45:20 UTC
Created attachment 69886 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.
Comment 60 Aleisha Amohia 2017-12-19 01:45:25 UTC
Created attachment 69887 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall
Comment 61 Aleisha Amohia 2017-12-19 01:45:30 UTC
Created attachment 69888 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)
Comment 62 Aleisha Amohia 2017-12-19 01:45:36 UTC
Created attachment 69889 [details] [review]
Bug 19532: Tests for Koha/Recalls
Comment 63 Aleisha Amohia 2017-12-19 01:45:44 UTC
Created attachment 69890 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523
Comment 64 Aleisha Amohia 2017-12-19 01:49:03 UTC
Sorry for the gazillions of emails! This should now apply cleanly on master.
I should've added in the original test plan to update the database and the schema after applying patches, so make sure you do that first! Here's the test plan again.

TEST PLAN:

0. Update database and schema
1. Enable the UseRecalls syspref
2. Go to Circulation and Fines Rules. Put some numbers in the recalls fields (recall due date interval, recall overdue fine amount, recall pickup period)
3. Put a number in the RecallsMaxPickUpDelay syspref. This will be the default number of days used if the recall pickup period isn't set in Step 2
4. Check out an item to a patron
5. Go to that item's detail page in the OPAC. Notice the holdings table says 'Checked out'
6. Log in to the OPAC with another patron and go back to that detail page. The holdings table should now have a Recall link next to the 'Checked out' text
7. Click the Recall button and confirm the Recall
8. Go to the user's opac summary and confirm there is now a Recalls tab, with the correct number of recalls (should be 1).
9. Test cancelling the recall by clicking Cancel. Confirm the recall has been cancelled. Repeat steps 6 and 7.
10. In the left navigation, there will also be a 'recalls history' tab. Click it. There should be a log, similar to reading history, with the cancelled recall and the new recall in it. Confirm all information is correct
11. Again, test cancelling the recall. Repeat steps 6 and 7.
12. In the staff interface, go to the logged in user's checkouts. Confirm you can see a new Recalls tab, with the active (not cancelled) recall in the table. Should be the same for the details tab also.
13. Test cancelling works for both of these again, and making new recalls again.
14. Check in the recalled item. You should see a pop up, asking to confirm the recall as waiting. Click confirm.
15. Go to the Circulation main page. You should see 3 new reports: recalls queue, overdue recalls and recalls awaiting pickup
16. Go to the recalls queue, confirm you can see an entire history of recalls at your library. Confirm cancel works when selecting checkboxes and clicking the multiple button. If you do this, you'll need to place the recall again and check the item in again
17. Go to recalls awaiting pickup. You should see the recall under the recalls waiting tab
18. in Mysql, set the waitingdate for your recall to be more than 'recall pickup period' days before today's date
19. Refresh the recalls awaiting pickup page. You should see the recall under the recalls waiting tab, and the recalls waiting more than X days tab.
20. expire the recall. confirm this is expired by checking the recalls queue
21. place another recall, but do not check it in
22. in mysql, set the date_due of the checkout (issues table) to be at least 'recall due date interval' number of days before today's date
23. run the overdue_notices.pl cronjob
24. go to the overdue recalls circ report and confirm your recall shows there
25. try cancelling the recall here also
26. in mysql, check the message_queue and confirm there have been the appropriate number of RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM notices sent with the correct to and from addresses and other content
27. test t/db_dependent/Koha/Recalls.t
Comment 65 Aleisha Amohia 2017-12-21 03:38:13 UTC
Created attachment 69986 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken
Comment 66 Aleisha Amohia 2017-12-22 01:03:28 UTC
Created attachment 70093 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl
Comment 67 Aleisha Amohia 2017-12-22 01:06:01 UTC
(In reply to Liz Rea from comment #37)
> These are functionality notes for Aleisha
> 
> OPAC client view:
> 
> We probably want to show the borrower when the book is now expected to be
> returned by on /cgi-bin/koha/opac-recalls.pl

done

> 
> Staff views:
> 
> - syspref needs to be defaulted to off please :)

done

> 
> /cgi-bin/koha/circ/recalls_queue.pl
> - probably want to see the new due date here as well

done

> 
> /cgi-bin/koha/catalogue/detail.pl?biblionumber=16
> - do we want to see what the old due date was here? (to think about, not
> required)

i think having the old and the new due date might cause some confusion

> - Probably want to show somewhere in the item table that there is a recall,
> and for whom (kinda like we do with holds)

done

> - do we want a tab on the detail page that shows all of the recalls for this
> biblio, and who they are for?

done 

> 
> General questions: 
> 
> - If we add an item with the same item type to a biblio that has a recall,
> should checking in this newly available item trigger the recall to be filled?

i'm not too sure about this. recalls are item-level not record-level so i haven't quite thought about how other available items could fill the recall. perhaps a future cronjob? maybe after this base feature gets through?

> 
> I'm out of time for this run at it, but honestly what a great first whack at
> it.

i've now implemented all of the discussed comments etc and i believe this is ready to test
Comment 68 Nick Clemens 2018-01-26 15:33:35 UTC
Hi Aleisha,

Overall things work well and are pretty intuitive.

Can you squash some of the patches to ease readability? (e.e. the removed old_recalls stuff)

Couple errors:
The db uppdate tries to insert after 'notes' in issuing rules, but this doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls' message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a transfer generated as well as confirming hold for recall

On recalls awaiting pickup: 
    need to update recall.borrower to recall.patron - causing internal server error


When placing a recall - if I hit 'back' after confirming and confirm again I get a second recall on the same item

Recalls queue should have waiting date information 
Recalls queue should have a way to hide cancelled, I would expect closed recalls to be hidden by default
Could overdue recalls be a tab/filter on the recalls queue?

When viewing a patrons account in the staff side we should see that a checkout has an active recall

Checking out the recall doesn't seem to close the recall

Question - 
    should canceling a recall extend the due date? or notify patron somehow?
    is calendar used to calculate new due date for recall? I think it should be
    I think circ rules should include 'number of open recalls' to (optionally) limit how many a patron can have
    Is it valid for two patrons to recall the second item? I would think the second one not be a hold? 

-Nick
Comment 69 Aleisha Amohia 2018-02-12 02:53:58 UTC
Created attachment 71409 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table
Comment 70 Katrin Fischer 2018-02-12 06:11:29 UTC
Hi Aleihsa, please keep in mind that the notices need to be added to all the translated installers as well. It's ok to add them in English, but they should be there to ease translation and don't have different behaviour.
Comment 71 Aleisha Amohia 2018-02-13 22:00:14 UTC
Created attachment 71574 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.
Comment 72 Aleisha Amohia 2018-02-13 22:00:21 UTC
Created attachment 71575 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>
Comment 73 Aleisha Amohia 2018-02-13 22:00:27 UTC
Created attachment 71576 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes
Comment 74 Aleisha Amohia 2018-02-13 22:00:32 UTC
Created attachment 71577 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.
Comment 75 Aleisha Amohia 2018-02-13 22:00:41 UTC
Created attachment 71578 [details] [review]
Bug 19532: Overdue recalls report
Comment 76 Aleisha Amohia 2018-02-13 22:00:47 UTC
Created attachment 71579 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls
Comment 77 Aleisha Amohia 2018-02-13 22:00:52 UTC
Created attachment 71580 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.
Comment 78 Aleisha Amohia 2018-02-13 22:00:59 UTC
Created attachment 71581 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl
Comment 79 Aleisha Amohia 2018-02-13 22:01:04 UTC
Created attachment 71582 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.
Comment 80 Aleisha Amohia 2018-02-13 22:01:10 UTC
Created attachment 71583 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.
Comment 81 Aleisha Amohia 2018-02-13 22:01:16 UTC
Created attachment 71584 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.
Comment 82 Aleisha Amohia 2018-02-13 22:01:22 UTC
Created attachment 71585 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall
Comment 83 Aleisha Amohia 2018-02-13 22:01:27 UTC
Created attachment 71586 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)
Comment 84 Aleisha Amohia 2018-02-13 22:01:34 UTC
Created attachment 71587 [details] [review]
Bug 19532: Tests for Koha/Recalls
Comment 85 Aleisha Amohia 2018-02-13 22:01:40 UTC
Created attachment 71588 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523
Comment 86 Aleisha Amohia 2018-02-13 22:01:47 UTC
Created attachment 71589 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken
Comment 87 Aleisha Amohia 2018-02-13 22:01:53 UTC
Created attachment 71590 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl
Comment 88 Aleisha Amohia 2018-02-13 22:01:59 UTC
Created attachment 71591 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table
Comment 89 Aleisha Amohia 2018-02-13 22:48:02 UTC
Created attachment 71592 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523
Comment 90 paxed 2018-02-14 08:19:21 UTC
These two messages in recalls.js don't seem to be translatable:

   message = "The recall may have already been cancelled. Please refresh the page.";
   message = "Cancelled"
Comment 91 Nick Clemens 2018-02-15 16:47:17 UTC
Is this ready for testing?
Comment 92 Aleisha Amohia 2018-02-18 21:16:49 UTC
(In reply to Nick Clemens from comment #91)
> Is this ready for testing?

Not yet, still working on fixes from Comment 68. Been having some trouble with my devbox but the patch is coming!
Comment 93 Brendan Gallagher 2018-02-26 20:55:38 UTC
Any update on this one?
Comment 94 Aleisha Amohia 2018-02-26 21:11:24 UTC
Created attachment 72244 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls
Comment 95 Aleisha Amohia 2018-02-26 21:12:20 UTC
(In reply to Nick Clemens from comment #68)

...

> Can you squash some of the patches to ease readability? (e.e. the removed
> old_recalls stuff)

Will do after fixes

...

> Could overdue recalls be a tab/filter on the recalls queue?

I already have overdue recalls as a separate report page, do you mean moving this to a tab on the recalls queue page or having both the separate report and the tab on the recalls queue?

...

> 
> Question - 
>     should canceling a recall extend the due date? or notify patron somehow?
>     is calendar used to calculate new due date for recall? I think it should
> be
>     I think circ rules should include 'number of open recalls' to
> (optionally) limit how many a patron can have
>     Is it valid for two patrons to recall the second item? I would think the
> second one not be a hold? 

All very good points but with all due respect I'd love to get this base feature through, then we can start thinking about these additional things.
Comment 96 Nick Clemens 2018-03-01 16:00:15 UTC
Created attachment 72311 [details] [review]
Bug 19532: Database updates

Adding the recalls table and the old_recalls table.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 97 Nick Clemens 2018-03-01 16:00:19 UTC
Created attachment 72312 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 98 Nick Clemens 2018-03-01 16:00:25 UTC
Created attachment 72313 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 99 Nick Clemens 2018-03-01 16:00:29 UTC
Created attachment 72314 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 100 Nick Clemens 2018-03-01 16:00:33 UTC
Created attachment 72315 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 101 Nick Clemens 2018-03-01 16:00:37 UTC
Created attachment 72316 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 102 Nick Clemens 2018-03-01 16:00:42 UTC
Created attachment 72317 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 103 Nick Clemens 2018-03-01 16:00:46 UTC
Created attachment 72318 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 104 Nick Clemens 2018-03-01 16:00:50 UTC
Created attachment 72319 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 105 Nick Clemens 2018-03-01 16:00:55 UTC
Created attachment 72320 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 106 Nick Clemens 2018-03-01 16:00:59 UTC
Created attachment 72321 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 107 Nick Clemens 2018-03-01 16:01:04 UTC
Created attachment 72322 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 108 Nick Clemens 2018-03-01 16:01:08 UTC
Created attachment 72323 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 109 Nick Clemens 2018-03-01 16:01:12 UTC
Created attachment 72324 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 110 Nick Clemens 2018-03-01 16:01:17 UTC
Created attachment 72325 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 111 Nick Clemens 2018-03-01 16:01:21 UTC
Created attachment 72326 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 112 Nick Clemens 2018-03-01 16:01:25 UTC
Created attachment 72327 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 113 Nick Clemens 2018-03-01 16:01:29 UTC
Created attachment 72328 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 114 Nick Clemens 2018-03-01 16:01:33 UTC
Created attachment 72329 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 115 Nick Clemens 2018-03-01 16:01:37 UTC
Created attachment 72330 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 116 Nick Clemens 2018-03-01 16:01:42 UTC
Created attachment 72331 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 117 Nick Clemens 2018-03-01 16:01:46 UTC
Created attachment 72332 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 118 Nick Clemens 2018-03-01 16:01:50 UTC
Created attachment 72333 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 119 Nick Clemens 2018-03-01 16:01:55 UTC
Created attachment 72334 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 120 Nick Clemens 2018-03-01 16:01:59 UTC
Created attachment 72335 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 121 Nick Clemens 2018-03-01 16:02:04 UTC
Created attachment 72336 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 122 Nick Clemens 2018-03-01 16:02:08 UTC
Created attachment 72337 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 123 Nick Clemens 2018-03-01 16:02:13 UTC
Created attachment 72338 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 124 Nick Clemens 2018-03-01 16:05:13 UTC
Rebased, tested and added some follow-ups to refine the functionality here - Aleisha can you sign off on my patch?

This implements basic recall functionality and leaves room for improvements, this is a good starting point and I think can be QAed with an eye toward building refinement and extending functionality in future patchsets.
Comment 125 Aleisha Amohia 2018-03-08 02:10:51 UTC
Created attachment 72527 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 126 Hugh Rundle 2018-03-27 23:53:34 UTC
This sounds like a great feature!

Just wondering about 'recall due date interval'. Will there be an option to not change the due date at all? i.e. we just want to recall the item to cataloguing maintenance when it's returned (and cut the queue if there are holds on the title/item), but we're not in a huge hurry.
Comment 127 Alain Dussert 2018-05-03 22:17:14 UTC
Hi All,

Has there been any updated ETA or target release date for this holds recall development?

Thanks,
Alain
Comment 128 Liz Rea 2018-05-03 22:30:12 UTC
Aleisha has been away on holiday, but this patch looks to be signed off and just waiting for QA?
Comment 129 Katrin Fischer 2018-05-04 05:22:40 UTC
We are in hard feature freeze now, so it won't make it into 18.05 (only a few days left to release), but maybe 18.11
Comment 130 Nick Clemens 2018-05-04 12:44:09 UTC
We talked about this one a lot at hackfest and have been working on recall functionality for one of our partners. While I agree on the strategy of starting small and avoiding scope creep I do think that we need a path forward and would really like to see an RFC that provides a roadmap to the final feature ensuring that this base allows for work towards that end.
Comment 131 Alain Dussert 2018-05-04 20:29:56 UTC
Hi All,

I agree that an RFC would be ideal. It would be great for this feature to be put in production in Koha 18.11

Thanks,
Alain
Comment 132 Chris Cormack 2018-05-04 20:33:33 UTC
I actually find this incredibly disappointing. We could have had a working feature in 18.05 except for people consistently trying to scope creep it. Now we won't until at least 18.11 and it will probably be over specced, over ambitious and fragile.
This has to stop.
Comment 133 Jonathan Druart 2018-05-04 20:44:14 UTC
It was too later for 18.05 anyway. We are in feature freeze for a week already.
Comment 134 Chris Cormack 2018-05-04 20:56:45 UTC
Yes, because of the months of stuff before.
Comment 135 Dobrica Pavlinusic 2018-06-02 09:06:10 UTC
(In reply to Chris Cormack from comment #132)
> I actually find this incredibly disappointing. We could have had a working
> feature in 18.05 except for people consistently trying to scope creep it.
> Now we won't until at least 18.11 and it will probably be over specced, over
> ambitious and fragile.
> This has to stop.

I have to throw in my $0.02 here: we just implemented recall notices on reservations using simple cron script:

https://github.com/dpavlin/Koha/blob/koha_ffzg/ffzg/recall_notices.pl

I would love to replace hard-coded values in it with circulation rules, but currently this bug doesn't apply, and squashing some of fixes into more manageable chunks would be great first step.

Due to our library circulation rules, OPAC parts of this patch are not interesting to us, but I would love to have intranet part in upstream Koha so that I can contribute cron script similar to ours. Does it make sense to split this bug into two halfs opac and intranet?
Comment 136 Chris Cormack 2018-06-02 09:12:55 UTC
While reserves might work for one use case, they won't for others. So instead of people turning this set of patches into the mess they've made it. There should have just been 2 different features.

We (Catalyst) are unlikely to put any more work into rebasing these for the 400th time until people figure out what they actually want. Even though we have the feature in production already
Comment 137 Alex Buckley 2018-07-10 22:21:50 UTC
Hi everyone on the CC list

Just a heads up that you will be receiving a lot of emails while I obsolete and attach newly rebased patches onto this bug report. 

I have rebased the rebase patches against master (as of 11 July 2018).

As we are already using recalls in production we have been able to identify several bugs in the recalls which had not been previously found, and I have written patches to fix these bugs which I am also attaching to this bug report: 

* Transfer recall modal always appears upon the return of a recalled item even if it is being returned to the library where it is to be picked up from. 

* When recall fields in the circulation rules are empty when a patron tries to confirm a recall on the OPAC an 'Internal Server Error' is thrown. i.e. There are no default values for the recall circ fields. 

* At present if recalls and course reserves are both enabled then if you try to view the opac-course-details.pl page for a course with a currently issued course reserve then an 'Internal Server Error' is thrown. The root cause of this is: Koha::Item->avail_for_recall does not have tests. avail_for_recall is used in the item-status.inc used by both opac-course-details.pl and opac-detail.pl and the error is caused by course reserves not handing back an avail_for_recall value as opac-detail.pl does. 

Hopefully with rebased recalls patches + new bug fix patches we can action this recalls feature along and get it into 18.11 release. 

Cheers,
Alex
Comment 138 Alex Buckley 2018-07-10 22:31:55 UTC
Created attachment 76817 [details] [review]
Bug 19532: Database updates

Adding the recalls table and the old_recalls table.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 139 Alex Buckley 2018-07-10 22:32:51 UTC
Created attachment 76818 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 140 Alex Buckley 2018-07-10 22:33:48 UTC
Created attachment 76819 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 141 Alex Buckley 2018-07-10 22:35:00 UTC
Created attachment 76820 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 142 Alex Buckley 2018-07-10 22:35:52 UTC
Created attachment 76821 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 143 Alex Buckley 2018-07-10 22:36:43 UTC
Created attachment 76822 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 144 Alex Buckley 2018-07-10 22:37:43 UTC
Created attachment 76823 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 145 Alex Buckley 2018-07-10 22:38:51 UTC
Created attachment 76824 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 146 Alex Buckley 2018-07-10 22:40:02 UTC
Created attachment 76825 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 147 Alex Buckley 2018-07-10 22:41:10 UTC
Created attachment 76826 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 148 Alex Buckley 2018-07-10 22:42:31 UTC
Created attachment 76827 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 149 Alex Buckley 2018-07-10 22:43:35 UTC
Created attachment 76828 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 150 Alex Buckley 2018-07-10 22:44:56 UTC
Created attachment 76829 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 151 Alex Buckley 2018-07-10 22:46:44 UTC
Created attachment 76830 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 152 Alex Buckley 2018-07-10 22:48:50 UTC
Created attachment 76831 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 153 Alex Buckley 2018-07-10 22:49:54 UTC
Created attachment 76832 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 154 Alex Buckley 2018-07-10 22:51:39 UTC
Created attachment 76833 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 155 Alex Buckley 2018-07-10 23:15:20 UTC
Created attachment 76834 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 156 Alex Buckley 2018-07-10 23:16:52 UTC
Created attachment 76835 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 157 Alex Buckley 2018-07-10 23:18:12 UTC
Created attachment 76836 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 158 Alex Buckley 2018-07-10 23:19:36 UTC
Created attachment 76837 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 159 Alex Buckley 2018-07-10 23:20:46 UTC
Created attachment 76838 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 160 Alex Buckley 2018-07-10 23:21:55 UTC
Created attachment 76839 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 161 Alex Buckley 2018-07-10 23:22:54 UTC
Created attachment 76840 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 162 Alex Buckley 2018-07-10 23:23:49 UTC
Created attachment 76841 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 163 Alex Buckley 2018-07-10 23:25:07 UTC
Created attachment 76842 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 164 Alex Buckley 2018-07-10 23:26:29 UTC
Created attachment 76843 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 165 Alex Buckley 2018-07-10 23:32:43 UTC
Created attachment 76844 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 166 Alex Buckley 2018-07-10 23:34:06 UTC
Created attachment 76845 [details] [review]
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly
Comment 167 Alex Buckley 2018-07-10 23:35:57 UTC
Created attachment 76846 [details] [review]
Bug 19532 - Recalls for Course Reserves.

This ptach fixes the 'Template process error
Koha::Item->avail_for_recall' which is thrown when loading a Course pgae
in opac-course-details.pl with course reserves which are currently
issued.

It also allows recalls to be placed from Course reserves

Sponsored-By: Catalyst IT
Comment 168 Alex Buckley 2018-07-10 23:37:23 UTC
Created attachment 76847 [details] [review]
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty

Sponsored-BY: Catalyst IT
Comment 169 Alex Buckley 2018-07-10 23:42:50 UTC
All of my rebased patches + additional fixes are attached now. 

I just double checked applying all of the patches on this bug report to master as of 11 July 2018 and they all apply correctly. 

I am setting this bug report to 'Needs signoff' to try and get it moving now it can be tested more easily as it applies on master.
Comment 170 Alex Buckley 2018-07-23 04:05:38 UTC
Created attachment 77177 [details] [review]
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted values for
recalls fields in the circulation rules (Administration->Circulation and
fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and confirm the recall

5. In the staff client go to Circulation->Recalls queue, notice the
recall has a status of 'Ready for pickup'

6. Try issuing the item to patron 3 and notice without this patch
applied you can issue a recall awaiting pickup to a patron who did not
place the recall.

7. Apply patch

8. Restart memcached and plack

9. Using a new item repeat steps 1,2,3,4,5,6 and notice you get a yellow
message displayed stating: 'This item is awaiting pickup by another
patron who recalled it.'

The issuing has not taken place to a patron who is not the patron who
placed the recall as the item is awaiting pickup by the recall
requester.

10. Issue the item to patron 2 and notice the issuing takes place
successfully

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 171 Alex Buckley 2018-07-23 04:24:07 UTC
Created attachment 77178 [details] [review]
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester

Previously the confirm recall popup was only displayed the first time
the recalled item was out through returns. However it is useful for the
Confirm recall popup to appear if the item is put through the returns
multiple times due to library staff being interrupted.

This ensures library staff are informed that the item has been recalled.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules (Administration->Circulation
and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and notice the 'Confirm recall' popup appears. Click
confirm

5. Now check the item in again and notice the popup is not displayed
this time.

6. Apply this patch

7. Restart memcached and plack

8. Using a new item repeat steps 2,3,4,5 and notice in step 5 the
'Confirm recall' popup is displayed this time. Click 'Confirm'

9. Check the item out to patron 2

10. Return the item and notice no popup is displayed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 172 Alex Buckley 2018-07-23 05:46:04 UTC
Created attachment 77179 [details] [review]
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup

This patch adds a new notice RECALL_REQUESTER_DET which like HOLD_SLIP
outlines borrower and item information so the item can be put aside for
the requester.

This patch also adds a 'Print and confirm' button to the 'Confirm
recall' popup that appears when returning a recalled item. This
functionality works the same as the 'Print and confirm' functionality
for the Hold slip: A print modal popup will appear for the user to
choose print settings, and choose to print or cancel.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules
(Administration->Circulation and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item in the staff client

5. Notice there are only two buttons on the 'Confirm recall' popup which
appears: 'Confirm' and 'Cancel'

6. Apply patch, run updatedatabase.pl (as there is a SQL atomicupdate
file to be run), and restart memcached and plack

7. Using a new item repeat steps 2,3

8. In a new tab, in the staff client go to Circulation->Recalls queue,
and notice the recall has a status of 'Requested'

8. Back in your first tab return the item and notice that a new button
'Print and confirm' is on the 'Confirm recall' popup. Select this button
and notice two new popup windows appear: Browsers print window, and a
window showing what the notice to be print looks like.

9. If you have a printer available print the notice.

Otherwise you can look at what the notice would look like in the notice window, observing the notice outlines the following information:

* Current date and time
* Recall pickup branch
* Borrowers first name and surname
* Borrowers cardnumber, phonenumber, address, address2, city, zipcode, email
* Recalled item title, author, barcode, callnumber.
* Recall waiting date, and recall notes

Some of these values will not be displayed on the notice if they are not
set. For example the patron may not have set an address, or email.

10. After either printing the notice, or selecting 'Cancel' in the print
window. Go back to your second tab and refresh the page and notice the
status of the recall has changed to 'Ready for pickup' this shows the
'Print and confirm' button does actually confirm the recall.

11. Making sure the changes implemented in the previous commit (Bug
19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns) still work. Try returning the item again and notice the 'Confirm recall' popup with the 'Print and confirm' button is displayed again and you can choose to print the notice again if you want.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 173 Owen Leonard 2018-08-09 15:15:07 UTC
I'm trying to test this and running into trouble:

Other comments: The changes to sample_notices.sql don't apply cleanly, but that can wait for a rebase. Easy to ignore at this stage of testing.

I get this error in the staff client:

Missing right curly or square bracket at /home/vagrant/kohaclone/C4/Circulation.pm line 4144, at end of line

It looks like there is a missing curly bracket at line 2064, so I added that before continuing.

Then: Checked-out items in the OPAC don't show a "recall" link on the detail page. I'm logged in as a different user than the one who has it checked out. Is there more I need to do to make something "available" for recall?

Or was my correction to Circulation.pm incorrect, causing some other problems?
Comment 174 Chris Cormack 2018-09-14 17:40:56 UTC
Applying: Bug 19532: recalls history
error: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 19532: recalls history

I can't get past this one sorry Alex, can you try a rebase please
Comment 175 Chris Cormack 2018-09-14 22:22:44 UTC
Created attachment 78755 [details] [review]
Bug 19532: Database updates

Adding the recalls table and the old_recalls table.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 176 Chris Cormack 2018-09-14 22:22:56 UTC
Created attachment 78757 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 177 Chris Cormack 2018-09-14 22:23:05 UTC
Created attachment 78759 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 178 Chris Cormack 2018-09-14 22:23:13 UTC
Created attachment 78761 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 179 Chris Cormack 2018-09-14 22:23:20 UTC
Created attachment 78763 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 180 Chris Cormack 2018-09-14 22:23:29 UTC
Created attachment 78765 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 181 Chris Cormack 2018-09-14 22:23:37 UTC
Created attachment 78766 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 182 Chris Cormack 2018-09-14 22:23:46 UTC
Created attachment 78768 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 183 Chris Cormack 2018-09-14 22:23:55 UTC
Created attachment 78770 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 184 Chris Cormack 2018-09-14 22:24:05 UTC
Created attachment 78772 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 185 Chris Cormack 2018-09-14 22:24:13 UTC
Created attachment 78773 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 186 Chris Cormack 2018-09-14 22:24:21 UTC
Created attachment 78774 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 187 Chris Cormack 2018-09-14 22:24:29 UTC
Created attachment 78775 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 188 Chris Cormack 2018-09-14 22:24:37 UTC
Created attachment 78776 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 189 Chris Cormack 2018-09-14 22:24:44 UTC
Created attachment 78777 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 190 Chris Cormack 2018-09-14 22:24:49 UTC
Created attachment 78778 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 191 Chris Cormack 2018-09-14 22:24:55 UTC
Created attachment 78780 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 192 Chris Cormack 2018-09-14 22:25:01 UTC
Created attachment 78782 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 193 Chris Cormack 2018-09-14 22:25:10 UTC
Created attachment 78785 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 194 Chris Cormack 2018-09-14 22:25:18 UTC
Created attachment 78787 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 195 Chris Cormack 2018-09-14 22:25:25 UTC
Created attachment 78789 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 196 Chris Cormack 2018-09-14 22:25:31 UTC
Created attachment 78790 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 197 Chris Cormack 2018-09-14 22:25:37 UTC
Created attachment 78792 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 198 Chris Cormack 2018-09-14 22:25:44 UTC
Created attachment 78794 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 199 Chris Cormack 2018-09-14 22:25:52 UTC
Created attachment 78797 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 200 Chris Cormack 2018-09-14 22:25:59 UTC
Created attachment 78800 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 201 Chris Cormack 2018-09-14 22:26:06 UTC
Created attachment 78801 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 202 Chris Cormack 2018-09-14 22:26:12 UTC
Created attachment 78802 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 203 Chris Cormack 2018-09-14 22:26:19 UTC
Created attachment 78803 [details] [review]
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly
Comment 204 Chris Cormack 2018-09-14 22:26:25 UTC
Created attachment 78804 [details] [review]
Bug 19532 - Recalls for Course Reserves.

This ptach fixes the 'Template process error
Koha::Item->avail_for_recall' which is thrown when loading a Course pgae
in opac-course-details.pl with course reserves which are currently
issued.

It also allows recalls to be placed from Course reserves

Sponsored-By: Catalyst IT
Comment 205 Chris Cormack 2018-09-14 22:26:32 UTC
Created attachment 78805 [details] [review]
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty

Sponsored-BY: Catalyst IT
Comment 206 Chris Cormack 2018-09-14 22:26:39 UTC
Created attachment 78806 [details] [review]
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted values for
recalls fields in the circulation rules (Administration->Circulation and
fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and confirm the recall

5. In the staff client go to Circulation->Recalls queue, notice the
recall has a status of 'Ready for pickup'

6. Try issuing the item to patron 3 and notice without this patch
applied you can issue a recall awaiting pickup to a patron who did not
place the recall.

7. Apply patch

8. Restart memcached and plack

9. Using a new item repeat steps 1,2,3,4,5,6 and notice you get a yellow
message displayed stating: 'This item is awaiting pickup by another
patron who recalled it.'

The issuing has not taken place to a patron who is not the patron who
placed the recall as the item is awaiting pickup by the recall
requester.

10. Issue the item to patron 2 and notice the issuing takes place
successfully

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 207 Chris Cormack 2018-09-14 22:26:46 UTC
Created attachment 78807 [details] [review]
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester

Previously the confirm recall popup was only displayed the first time
the recalled item was out through returns. However it is useful for the
Confirm recall popup to appear if the item is put through the returns
multiple times due to library staff being interrupted.

This ensures library staff are informed that the item has been recalled.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules (Administration->Circulation
and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and notice the 'Confirm recall' popup appears. Click
confirm

5. Now check the item in again and notice the popup is not displayed
this time.

6. Apply this patch

7. Restart memcached and plack

8. Using a new item repeat steps 2,3,4,5 and notice in step 5 the
'Confirm recall' popup is displayed this time. Click 'Confirm'

9. Check the item out to patron 2

10. Return the item and notice no popup is displayed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 208 Chris Cormack 2018-09-14 22:26:52 UTC
Created attachment 78808 [details] [review]
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup

This patch adds a new notice RECALL_REQUESTER_DET which like HOLD_SLIP
outlines borrower and item information so the item can be put aside for
the requester.

This patch also adds a 'Print and confirm' button to the 'Confirm
recall' popup that appears when returning a recalled item. This
functionality works the same as the 'Print and confirm' functionality
for the Hold slip: A print modal popup will appear for the user to
choose print settings, and choose to print or cancel.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules
(Administration->Circulation and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item in the staff client

5. Notice there are only two buttons on the 'Confirm recall' popup which
appears: 'Confirm' and 'Cancel'

6. Apply patch, run updatedatabase.pl (as there is a SQL atomicupdate
file to be run), and restart memcached and plack

7. Using a new item repeat steps 2,3

8. In a new tab, in the staff client go to Circulation->Recalls queue,
and notice the recall has a status of 'Requested'

8. Back in your first tab return the item and notice that a new button
'Print and confirm' is on the 'Confirm recall' popup. Select this button
and notice two new popup windows appear: Browsers print window, and a
window showing what the notice to be print looks like.

9. If you have a printer available print the notice.

Otherwise you can look at what the notice would look like in the notice window, observing the notice outlines the following information:

* Current date and time
* Recall pickup branch
* Borrowers first name and surname
* Borrowers cardnumber, phonenumber, address, address2, city, zipcode, email
* Recalled item title, author, barcode, callnumber.
* Recall waiting date, and recall notes

Some of these values will not be displayed on the notice if they are not
set. For example the patron may not have set an address, or email.

10. After either printing the notice, or selecting 'Cancel' in the print
window. Go back to your second tab and refresh the page and notice the
status of the recall has changed to 'Ready for pickup' this shows the
'Print and confirm' button does actually confirm the recall.

11. Making sure the changes implemented in the previous commit (Bug
19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns) still work. Try returning the item again and notice the 'Confirm recall' popup with the 'Print and confirm' button is displayed again and you can choose to print the notice again if you want.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 209 Owen Leonard 2018-09-26 19:43:44 UTC
Sorry, this doesn't apply anymore. I had begun testing just before master changed and was getting an error in Circulation.pm which I'm thinking may have been a merge error?

Missing right curly or square bracket at /home/vagrant/kohaclone/C4/Circulation.pm line 4147, at end of line
Comment 210 Alex Buckley 2018-10-17 22:53:37 UTC
Hi all

I have gone through and fixed the conflicts when applying these patches, and will attach the fixed patches. 

Apologies for the email deluge.

Cheers,
Alex
Comment 211 Alex Buckley 2018-10-17 23:01:35 UTC
Created attachment 80763 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 212 Alex Buckley 2018-10-17 23:02:11 UTC
Created attachment 80764 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 213 Alex Buckley 2018-10-17 23:02:43 UTC
Created attachment 80765 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 214 Alex Buckley 2018-10-17 23:03:12 UTC
Created attachment 80766 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 215 Alex Buckley 2018-10-17 23:03:50 UTC
Created attachment 80767 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 216 Alex Buckley 2018-10-17 23:04:17 UTC
Created attachment 80768 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 217 Alex Buckley 2018-10-17 23:04:43 UTC
Created attachment 80769 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 218 Alex Buckley 2018-10-17 23:05:16 UTC
Created attachment 80770 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 219 Alex Buckley 2018-10-17 23:05:44 UTC
Created attachment 80771 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 220 Alex Buckley 2018-10-17 23:06:10 UTC
Created attachment 80772 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 221 Alex Buckley 2018-10-17 23:06:43 UTC
Created attachment 80773 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 222 Alex Buckley 2018-10-17 23:07:08 UTC
Created attachment 80774 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 223 Alex Buckley 2018-10-17 23:07:37 UTC
Created attachment 80775 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 224 Alex Buckley 2018-10-17 23:08:14 UTC
Created attachment 80776 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 225 Alex Buckley 2018-10-17 23:08:39 UTC
Created attachment 80777 [details] [review]
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly
Comment 226 Alex Buckley 2018-10-17 23:09:04 UTC
Created attachment 80778 [details] [review]
Bug 19532 - Recalls for Course Reserves.

This ptach fixes the 'Template process error
Koha::Item->avail_for_recall' which is thrown when loading a Course pgae
in opac-course-details.pl with course reserves which are currently
issued.

It also allows recalls to be placed from Course reserves

Sponsored-By: Catalyst IT
Comment 227 Alex Buckley 2018-10-17 23:09:27 UTC
Created attachment 80779 [details] [review]
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty

Sponsored-BY: Catalyst IT
Comment 228 Alex Buckley 2018-10-17 23:09:56 UTC
Created attachment 80780 [details] [review]
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted values for
recalls fields in the circulation rules (Administration->Circulation and
fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and confirm the recall

5. In the staff client go to Circulation->Recalls queue, notice the
recall has a status of 'Ready for pickup'

6. Try issuing the item to patron 3 and notice without this patch
applied you can issue a recall awaiting pickup to a patron who did not
place the recall.

7. Apply patch

8. Restart memcached and plack

9. Using a new item repeat steps 1,2,3,4,5,6 and notice you get a yellow
message displayed stating: 'This item is awaiting pickup by another
patron who recalled it.'

The issuing has not taken place to a patron who is not the patron who
placed the recall as the item is awaiting pickup by the recall
requester.

10. Issue the item to patron 2 and notice the issuing takes place
successfully

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 229 Alex Buckley 2018-10-17 23:10:25 UTC
Created attachment 80781 [details] [review]
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester

Previously the confirm recall popup was only displayed the first time
the recalled item was out through returns. However it is useful for the
Confirm recall popup to appear if the item is put through the returns
multiple times due to library staff being interrupted.

This ensures library staff are informed that the item has been recalled.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules (Administration->Circulation
and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and notice the 'Confirm recall' popup appears. Click
confirm

5. Now check the item in again and notice the popup is not displayed
this time.

6. Apply this patch

7. Restart memcached and plack

8. Using a new item repeat steps 2,3,4,5 and notice in step 5 the
'Confirm recall' popup is displayed this time. Click 'Confirm'

9. Check the item out to patron 2

10. Return the item and notice no popup is displayed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 230 Alex Buckley 2018-10-17 23:11:12 UTC
Created attachment 80782 [details] [review]
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup

This patch adds a new notice RECALL_REQUESTER_DET which like HOLD_SLIP
outlines borrower and item information so the item can be put aside for
the requester.

This patch also adds a 'Print and confirm' button to the 'Confirm
recall' popup that appears when returning a recalled item. This
functionality works the same as the 'Print and confirm' functionality
for the Hold slip: A print modal popup will appear for the user to
choose print settings, and choose to print or cancel.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules
(Administration->Circulation and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item in the staff client

5. Notice there are only two buttons on the 'Confirm recall' popup which
appears: 'Confirm' and 'Cancel'

6. Apply patch, run updatedatabase.pl (as there is a SQL atomicupdate
file to be run), and restart memcached and plack

7. Using a new item repeat steps 2,3

8. In a new tab, in the staff client go to Circulation->Recalls queue,
and notice the recall has a status of 'Requested'

8. Back in your first tab return the item and notice that a new button
'Print and confirm' is on the 'Confirm recall' popup. Select this button
and notice two new popup windows appear: Browsers print window, and a
window showing what the notice to be print looks like.

9. If you have a printer available print the notice.

Otherwise you can look at what the notice would look like in the notice window, observing the notice outlines the following information:

* Current date and time
* Recall pickup branch
* Borrowers first name and surname
* Borrowers cardnumber, phonenumber, address, address2, city, zipcode, email
* Recalled item title, author, barcode, callnumber.
* Recall waiting date, and recall notes

Some of these values will not be displayed on the notice if they are not
set. For example the patron may not have set an address, or email.

10. After either printing the notice, or selecting 'Cancel' in the print
window. Go back to your second tab and refresh the page and notice the
status of the recall has changed to 'Ready for pickup' this shows the
'Print and confirm' button does actually confirm the recall.

11. Making sure the changes implemented in the previous commit (Bug
19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns) still work. Try returning the item again and notice the 'Confirm recall' popup with the 'Print and confirm' button is displayed again and you can choose to print the notice again if you want.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 231 Alex Buckley 2018-10-17 23:16:21 UTC
All attached. I just tested and all commits apply cleanly on master as of 18 oct 2018.
Comment 232 Alex Buckley 2018-10-17 23:49:26 UTC
Just a note that I will be attaching a few more additional patches to this bug report in the next hour or so.
Comment 233 Alex Buckley 2018-10-18 01:45:18 UTC
Created attachment 80783 [details] [review]
Bug 19532: Fixing Internal Server Error thrown on C4/Circulation.pm

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 234 Alex Buckley 2018-10-18 01:45:50 UTC
Created attachment 80784 [details] [review]
Bug 19532: Implemented check if recall status equals 'R' before recall popup is shown

This stops the 'confirm recall' popup message being displayed upon item
return when the item has a recall with any status other than 'R' (recalled).

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 235 Alex Buckley 2018-10-18 01:46:21 UTC
Created attachment 80785 [details] [review]
Bug 19532: Added conditional to check the recall has a status = 'W' before setting it to closed

This solves a bug I found that if the same borrower number and itemnumber combination occur more than once in the recalls database table then when the item is checked out to the patron who recalled the item then the recall is not updated to have a status of closed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 236 Alex Buckley 2018-10-18 01:47:02 UTC
Created attachment 80786 [details] [review]
Bug 19532: Fixed display of recall buttons on opac-course-details.pl

Recall button now displayed on items in opac-course-details.pl which are
issued to another user.

No internal server error being thrown on courses with issued course reserves.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 237 Alex Buckley 2018-10-18 01:47:35 UTC
Created attachment 80787 [details] [review]
Bug 19532: Stopping recalls awaiting pickup to be issued to patrons other than the patron who recalled.

Also fixed the display of item status in the holdings table on detail.pl
on staff client so it doesn't say an item has been recalled when the
recall has the status of 'F' (fulfilled) or 'C' (cancelled)

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 238 Alex Buckley 2018-10-18 01:48:17 UTC
Created attachment 80788 [details] [review]
Bug 19532: Amended the detail.pl call to retrieve recalls so now it retrieves recalls with the status of 'R' or 'W'

This means the 'Item recalled by' text is displayed in the holdings
table in detail.pl for items with a recall with the status of recalled
or waiting.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 239 Alex Buckley 2018-10-18 01:48:55 UTC
Created attachment 80789 [details] [review]
Bug 19532: Stopping recalled items (recall status='R') from being renewed

Test plan:
1. Check out an item to a borrower and note the due date
2. Recall the item and note the updated due date
3. Try renewing the item and notice you can't. A message appears telling
you the item has been recalled and cannot be renewed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 240 Alex Buckley 2018-10-18 03:29:20 UTC
Created attachment 80793 [details] [review]
Bug 19532: Fixed Internal Server error thrown upon returning recalled item

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 241 Alex Buckley 2018-10-18 20:31:59 UTC
Hi all

I've added the additional patches now. 

All patches apply cleanly on master as of 18th of Oct 2018.  

I am setting this to 'Needs signoff'. 

Just a note I have noticed some DB errors (e.g. when paying fees on paycollect.pl, and upon returning items). I found from using git bisect these errors were being caused by the regressions introduced by one of the patches on bug 20521: https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73683&action=diff

You may have also seen the emails regarding bug 20521 in the Koha-devel mailing list. 

I've filed another bug report for the DB error on paycollect.pl - Bug 21593 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21593) - which Nick Clements has just attached a fix for. 

So in short if you experience DB errors during testing they may be due to 20521, not neccessarily recalls. 

Cheers,
Alex
Comment 242 Alex Buckley 2018-10-18 20:54:06 UTC
Created attachment 80878 [details] [review]
Bug 19532: Fix t/db_dependent/Koha/Recalls.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 243 Alex Buckley 2018-10-25 22:13:38 UTC
Hi all

I have gone through and rebased again and will be attaching the rebased patches now. 

I will also be adding further enhancement patches.

Apologies for the email deluge. 

Cheers,
Alex
Comment 244 Alex Buckley 2018-10-25 22:25:17 UTC
Created attachment 81204 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 245 Alex Buckley 2018-10-25 22:26:16 UTC
Created attachment 81205 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 246 Alex Buckley 2018-10-25 22:27:10 UTC
Created attachment 81206 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 247 Alex Buckley 2018-10-25 22:28:33 UTC
Created attachment 81207 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 248 Alex Buckley 2018-10-25 22:29:15 UTC
Created attachment 81208 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 249 Alex Buckley 2018-10-25 22:29:40 UTC
Created attachment 81209 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 250 Alex Buckley 2018-10-25 22:30:04 UTC
Created attachment 81210 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 251 Alex Buckley 2018-10-25 22:30:30 UTC
Created attachment 81211 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 252 Alex Buckley 2018-10-25 22:30:59 UTC
Created attachment 81212 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 253 Alex Buckley 2018-10-25 22:31:35 UTC
Created attachment 81213 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 254 Alex Buckley 2018-10-25 22:31:58 UTC
Created attachment 81214 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 255 Alex Buckley 2018-10-25 22:32:25 UTC
Created attachment 81215 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 256 Alex Buckley 2018-10-25 22:32:49 UTC
Created attachment 81216 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 257 Alex Buckley 2018-10-25 22:33:23 UTC
Created attachment 81217 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 258 Alex Buckley 2018-10-25 22:33:49 UTC
Created attachment 81218 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 259 Alex Buckley 2018-10-25 22:34:14 UTC
Created attachment 81219 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 260 Alex Buckley 2018-10-25 22:34:40 UTC
Created attachment 81220 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 261 Alex Buckley 2018-10-25 22:35:07 UTC
Created attachment 81221 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 262 Alex Buckley 2018-10-25 22:35:35 UTC
Created attachment 81222 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 263 Alex Buckley 2018-10-25 22:36:09 UTC
Created attachment 81223 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 264 Alex Buckley 2018-10-25 22:36:32 UTC
Created attachment 81224 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 265 Alex Buckley 2018-10-25 22:36:55 UTC
Created attachment 81225 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 266 Alex Buckley 2018-10-25 22:37:18 UTC
Created attachment 81226 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 267 Alex Buckley 2018-10-25 22:37:46 UTC
Created attachment 81227 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 268 Alex Buckley 2018-10-25 22:38:12 UTC
Created attachment 81228 [details] [review]
Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly
Comment 269 Alex Buckley 2018-10-25 22:38:36 UTC
Created attachment 81229 [details] [review]
Bug 19532 - Recalls for Course Reserves.

This ptach fixes the 'Template process error
Koha::Item->avail_for_recall' which is thrown when loading a Course pgae
in opac-course-details.pl with course reserves which are currently
issued.

It also allows recalls to be placed from Course reserves

Sponsored-By: Catalyst IT
Comment 270 Alex Buckley 2018-10-25 22:39:00 UTC
Created attachment 81230 [details] [review]
Bug 19532 - Fix for recall OPAC confirmation failing when recall circ rule is empty

Sponsored-BY: Catalyst IT
Comment 271 Alex Buckley 2018-10-25 22:39:24 UTC
Created attachment 81231 [details] [review]
Bug 19532 - Stopping an recalled item currently awaiting pickup from being able to be checked out to patrons other than the recall requester.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted values for
recalls fields in the circulation rules (Administration->Circulation and
fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and confirm the recall

5. In the staff client go to Circulation->Recalls queue, notice the
recall has a status of 'Ready for pickup'

6. Try issuing the item to patron 3 and notice without this patch
applied you can issue a recall awaiting pickup to a patron who did not
place the recall.

7. Apply patch

8. Restart memcached and plack

9. Using a new item repeat steps 1,2,3,4,5,6 and notice you get a yellow
message displayed stating: 'This item is awaiting pickup by another
patron who recalled it.'

The issuing has not taken place to a patron who is not the patron who
placed the recall as the item is awaiting pickup by the recall
requester.

10. Issue the item to patron 2 and notice the issuing takes place
successfully

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 272 Alex Buckley 2018-10-25 22:39:55 UTC
Created attachment 81232 [details] [review]
Bug 19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns until it is checked out to recall requester

Previously the confirm recall popup was only displayed the first time
the recalled item was out through returns. However it is useful for the
Confirm recall popup to appear if the item is put through the returns
multiple times due to library staff being interrupted.

This ensures library staff are informed that the item has been recalled.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules (Administration->Circulation
and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item and notice the 'Confirm recall' popup appears. Click
confirm

5. Now check the item in again and notice the popup is not displayed
this time.

6. Apply this patch

7. Restart memcached and plack

8. Using a new item repeat steps 2,3,4,5 and notice in step 5 the
'Confirm recall' popup is displayed this time. Click 'Confirm'

9. Check the item out to patron 2

10. Return the item and notice no popup is displayed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 273 Alex Buckley 2018-10-25 22:40:26 UTC
Created attachment 81233 [details] [review]
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup

This patch adds a new notice RECALL_REQUESTER_DET which like HOLD_SLIP
outlines borrower and item information so the item can be put aside for
the requester.

This patch also adds a 'Print and confirm' button to the 'Confirm
recall' popup that appears when returning a recalled item. This
functionality works the same as the 'Print and confirm' functionality
for the Hold slip: A print modal popup will appear for the user to
choose print settings, and choose to print or cancel.

Test plan:
1. Ensure 'UseRecalls' sypref is enabled and you have inputted
values for recalls fields in the circulation rules
(Administration->Circulation and fines rules)

2. Check item out to patron 1

3. Log into the OPAC as patron 2 and place a recall on the checked out
item

4. Return the item in the staff client

5. Notice there are only two buttons on the 'Confirm recall' popup which
appears: 'Confirm' and 'Cancel'

6. Apply patch, run updatedatabase.pl (as there is a SQL atomicupdate
file to be run), and restart memcached and plack

7. Using a new item repeat steps 2,3

8. In a new tab, in the staff client go to Circulation->Recalls queue,
and notice the recall has a status of 'Requested'

8. Back in your first tab return the item and notice that a new button
'Print and confirm' is on the 'Confirm recall' popup. Select this button
and notice two new popup windows appear: Browsers print window, and a
window showing what the notice to be print looks like.

9. If you have a printer available print the notice.

Otherwise you can look at what the notice would look like in the notice window, observing the notice outlines the following information:

* Current date and time
* Recall pickup branch
* Borrowers first name and surname
* Borrowers cardnumber, phonenumber, address, address2, city, zipcode, email
* Recalled item title, author, barcode, callnumber.
* Recall waiting date, and recall notes

Some of these values will not be displayed on the notice if they are not
set. For example the patron may not have set an address, or email.

10. After either printing the notice, or selecting 'Cancel' in the print
window. Go back to your second tab and refresh the page and notice the
status of the recall has changed to 'Ready for pickup' this shows the
'Print and confirm' button does actually confirm the recall.

11. Making sure the changes implemented in the previous commit (Bug
19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns) still work. Try returning the item again and notice the 'Confirm recall' popup with the 'Print and confirm' button is displayed again and you can choose to print the notice again if you want.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 274 Alex Buckley 2018-10-25 22:40:49 UTC
Created attachment 81234 [details] [review]
Bug 19532: Fixing Internal Server Error thrown on C4/Circulation.pm

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 275 Alex Buckley 2018-10-25 22:41:15 UTC
Created attachment 81235 [details] [review]
Bug 19532: Implemented check if recall status equals 'R' before recall popup is shown

This stops the 'confirm recall' popup message being displayed upon item
return when the item has a recall with any status other than 'R' (recalled).

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 276 Alex Buckley 2018-10-25 22:41:40 UTC
Created attachment 81236 [details] [review]
Bug 19532: Added conditional to check the recall has a status = 'W' before setting it to closed

This solves a bug I found that if the same borrower number and itemnumber combination occur more than once in the recalls database table then when the item is checked out to the patron who recalled the item then the recall is not updated to have a status of closed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 277 Alex Buckley 2018-10-25 22:42:03 UTC
Created attachment 81237 [details] [review]
Bug 19532: Fixed display of recall buttons on opac-course-details.pl

Recall button now displayed on items in opac-course-details.pl which are
issued to another user.

No internal server error being thrown on courses with issued course reserves.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 278 Alex Buckley 2018-10-25 22:42:28 UTC
Created attachment 81238 [details] [review]
Bug 19532: Stopping recalls awaiting pickup to be issued to patrons other than the patron who recalled.

Also fixed the display of item status in the holdings table on detail.pl
on staff client so it doesn't say an item has been recalled when the
recall has the status of 'F' (fulfilled) or 'C' (cancelled)

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 279 Alex Buckley 2018-10-25 22:43:01 UTC
Created attachment 81239 [details] [review]
Bug 19532: Amended the detail.pl call to retrieve recalls so now it retrieves recalls with the status of 'R' or 'W'

This means the 'Item recalled by' text is displayed in the holdings
table in detail.pl for items with a recall with the status of recalled
or waiting.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 280 Alex Buckley 2018-10-25 22:43:45 UTC
Created attachment 81240 [details] [review]
Bug 19532: Stopping recalled items (recall status='R') from being renewed

Test plan:
1. Check out an item to a borrower and note the due date
2. Recall the item and note the updated due date
3. Try renewing the item and notice you can't. A message appears telling
you the item has been recalled and cannot be renewed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 281 Alex Buckley 2018-10-25 22:44:12 UTC
Created attachment 81241 [details] [review]
Bug 19532: Fixed Internal Server error thrown upon returning recalled item

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 282 Alex Buckley 2018-10-25 22:44:36 UTC
Created attachment 81242 [details] [review]
Bug 19532: Fix t/db_dependent/Koha/Recalls.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 283 Alex Buckley 2018-10-25 22:45:12 UTC
Created attachment 81243 [details] [review]
Bug 19532: Stop item status='Available' for waiting recalls

This patch alters the display of the item status in the staff client and
OPAC so items which are waiting recalls are not shown in these
interfaces with the status of 'available'.

Waiting recalls are not available they are only available to the patron
who recalled them.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 284 Alex Buckley 2018-10-25 22:46:07 UTC
Created attachment 81244 [details] [review]
Bug 19532: Amended C4/Circulation->CanBookBeIssued()

This function now checks for waiting recalls before checking for
reserves on an item.

If a recall record does exist and it was placed by the same borrower who
is trying to check out the item then no check for reserves takes place
because the waiting recall takes precedence.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 285 Alex Buckley 2018-10-25 22:46:42 UTC
Created attachment 81245 [details] [review]
Bug 19532: Fixed missing variable declaration error

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 286 Alex Buckley 2018-10-25 22:47:11 UTC
Created attachment 81246 [details] [review]
Bug 19532: Added missing conditional check so now item availability for recalled items on OPAC search results page is corrected

On the OPAC now if an item is a waiting recall then it is shown as 'On
reserve' rather than available.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 287 Alex Buckley 2018-10-25 23:07:59 UTC
Created attachment 81247 [details] [review]
Bug 19532: Added ability to set Recall due date interval, and Recall pickup period to hours

Previously you could only set a number of days a recalled item
has to be returned (Recall due date interval (days)) and a number of
days available for a recalled item to be picked up.

For academic libraries which often loan high-demand items out by a
certain number of hours being able to set the number of hours a borrower
has to return a recalled item and for the recaller to pickup the waiting
recall is important.

This patch implement a check in C4::Overdue->CalcFine() if item is
recalled.

If the item has been recalled and is past the due date then use the
recall_overdue_fine to calculate the appropriate fine to charge the
patron, otherwise use the fines value in the issuingrules table

Also implemented atomicupdate to change recalls waitingdate and
expirationdate to datetime datatypes with associated template changes in
the recalls reports to display the date and time of these recall values.

Test plan:
1. Apply all other patches on bug 19532 (except this patch)

2. Set a fine charge interval period (if you do not have this field set
in the circ rule then the fine will not be applied).

3. Set the 'Unit' of the circ rule to 'hours', 'Recall due date
interval' = 1, recall overdue fune amount= 1, recall pickup period=1

4. Check out an item to borrower A and recall it in the OPAC by borrower
B

5. In the database manually change the issues.date_due to 1 hour
before the current time

6. From the Koha shell run './misc/cronjobs/fines.pl'

7. Notice the fine of 1 has been applied to the borrower for being 1
hour late in returning the recall

8. Return the item and confirm the recall. Manually change the waiting
date to more than 1 hour before the current time and repeat step 6
running overdue_notices.pl

9. Notice the recall is overdue now

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 288 Alex Buckley 2018-10-25 23:12:25 UTC
All done, and I have attached 6 additional patches fixing a few bugs and introducing new features such as the ability to set the Recall due date interval and Recall pickup period in the unit of hours (previously these fields were only in days).
Comment 289 Martin Renvoize 2018-10-29 14:12:39 UTC
sha1 conflicts half way through applying.. then when attempting a patch -p1 I get patch ends i middle of file.
Comment 290 Alex Buckley 2018-10-29 20:54:57 UTC
Created attachment 81547 [details] [review]
Bug 19532: Database updates

Adding the recalls table and the old_recalls table.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 291 Alex Buckley 2018-10-29 20:56:06 UTC
Created attachment 81548 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 292 Alex Buckley 2018-10-29 20:56:31 UTC
Created attachment 81549 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 293 Alex Buckley 2018-10-29 20:57:48 UTC
Created attachment 81550 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 294 Alex Buckley 2018-10-29 20:58:13 UTC
Created attachment 81551 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 295 Alex Buckley 2018-10-29 20:59:54 UTC
Created attachment 81552 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 296 Alex Buckley 2018-10-29 21:00:29 UTC
Created attachment 81553 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 297 Alex Buckley 2018-10-29 21:00:52 UTC
Created attachment 81554 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 298 Alex Buckley 2018-10-29 21:01:57 UTC
Created attachment 81555 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 299 Alex Buckley 2018-10-29 21:02:21 UTC
Created attachment 81556 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 300 Alex Buckley 2018-10-29 21:02:56 UTC
Created attachment 81557 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 301 Alex Buckley 2018-10-29 21:03:20 UTC
Created attachment 81558 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 302 Alex Buckley 2018-10-29 21:03:44 UTC
Created attachment 81559 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 303 Alex Buckley 2018-10-29 21:04:32 UTC
Created attachment 81560 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 304 Alex Buckley 2018-10-29 21:05:09 UTC
Created attachment 81561 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 305 Alex Buckley 2018-10-29 21:05:33 UTC
Created attachment 81562 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 306 Alex Buckley 2018-10-29 21:07:39 UTC
Created attachment 81563 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 307 Alex Buckley 2018-10-29 21:08:15 UTC
Created attachment 81564 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 308 Alex Buckley 2018-10-29 21:09:12 UTC
Created attachment 81565 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 309 Alex Buckley 2018-10-29 21:09:52 UTC
Created attachment 81566 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 310 Alex Buckley 2018-10-29 21:12:39 UTC
Created attachment 81567 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 311 Alex Buckley 2018-10-29 21:13:08 UTC
Created attachment 81568 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 312 Alex Buckley 2018-10-29 21:13:39 UTC
Created attachment 81569 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 313 Alex Buckley 2018-10-29 21:34:33 UTC
Created attachment 81583 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 314 Alex Buckley 2018-10-29 21:35:04 UTC
Created attachment 81584 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 315 Alex Buckley 2018-10-29 21:35:29 UTC
Created attachment 81585 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 316 Alex Buckley 2018-10-29 21:35:52 UTC
Created attachment 81586 [details] [review]
Bug 19532 (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 317 Alex Buckley 2018-10-29 21:36:15 UTC
Created attachment 81587 [details] [review]
Bug 19532 - Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 318 Alex Buckley 2018-10-29 21:36:41 UTC
Created attachment 81588 [details] [review]
Bug 19532: Fixes and enhancements to recalls

This implements the following fixes and enhancements:

1. Stopping a waiting recall from being able to be checked out to
patrons other than the patron who placed the recall

2. Make the Recall confirmation popup appear everytime a recalled item
is put through returns until it is checked out to recall requester

3. Introduce a new notice RECALL_REQUESTER_DET which outlines borrower and item information so the item can be put aside

4. Stop recalled items from being renewed

5. Stop display of 'Available' for waiting recalls

6. Check if recalls exist on an item before checking for reserves

7. Added ability to set Recall due date interval, and Recall pickup
period in hours

8. Fix the 'Template process error Koha::Item->avail_for_recall' thrown
on course page where a course reserve is currently issued

Test plan:
1. Enable the UseRecalls syspref
2. Go to Circulation and Fines Rules. Put some numbers in the recalls
fields (recall due date interval, recall overdue fine amount, recall
pickup period)  - the unit of recall due date interval and recall pickup
period is either days or hours as set in the circ rule 'unit' field
3. Put a number in the RecallsMaxPickUpDelay syspref. This will be the
default number of days or hours used if the recall pickup period isn't set in
Step 2
4. Check out an item to a patron
5. Go to that item's detail page in the OPAC. Notice the holdings table
says 'Checked out'
6. Log in to the OPAC with another patron and go back to that detail
page. The holdings table should now have a Recall link next to the
'Checked out' text
7. Click the Recall button and confirm the Recall
8. Go to the user's opac summary and confirm there is now a Recalls tab,
with the correct number of recalls (should be 1).
9. Test cancelling the recall by clicking Cancel. Confirm the recall
has been cancelled. Repeat steps 6 and 7.
10. In the left navigation, there will also be a 'recalls history'
tab. Click it. There should be a log, similar to reading history,
with the cancelled recall and the new recall in it. Confirm all
information is correct
11. Again, test cancelling the recall. Repeat steps 6 and 7.
12. In the staff interface, go to the logged in user's checkouts.
Confirm you can see a new Recalls tab, with the active (not
cancelled) recall in the table. Should be the same for the
details tab also.
13. Test cancelling works for both of these again, and making new
recalls again.
14. Check in the recalled item. You should see a pop up, asking to
confirm the recall as waiting. Click confirm.
15. Go to the Circulation main page. You should see 3 new reports:
recalls queue, overdue recalls and recalls awaiting pickup
16. Go to the recalls queue, confirm you can see an entire history
of recalls at your library. Confirm cancel works when selecting
checkboxes and clicking the multiple button. If you do this, you'll
need to place the recall again and check the item in again
17. Go to recalls awaiting pickup. You should see the recall under
the recalls waiting tab
18. in Mysql, set the waitingdate for your recall to be more than
'recall pickup period' days or hours (depends on what is set in the circ
rule (unit) field) before present
19. Refresh the recalls awaiting pickup page. You should see the
recall under the recalls waiting tab, and the recalls waiting more
than X days/hours tab.
20. expire the recall. confirm this is expired by checking the
recalls queue
21. place another recall, but do not check it in
22. in mysql, set the date_due of the checkout (issues table) to be
at least 'recall due date interval' number of days or hours before today's
date
23. run the overdue_notices.pl cronjob
24. go to the overdue recalls circ report and confirm your recall
shows there
25. try cancelling the recall here also
26. in mysql, check the message_queue and confirm there have been
the appropriate number of RETURN_RECALLED_ITEM and
PICKUP_RECALLED_ITEM notices sent with the correct to and from
addresses and other content
27. test t/db_dependent/Koha/Recalls.t
28. place another recall and check it in
29. Try checking the recall out to a different patron and confirm you
are not able to check out a waiting recall to a different patron - This
tests point #1 above
30. Check the same item in again and observe that the recall modal is
displayed again and is displayed every time the item is checked in until
the item is checked out to the patron who placed the recall - This tests
point #2 above
31. Check the item in again and select the 'Print slip and confirm' and
confirm the RECALL_REQUESTER_DET notice can be printed - This tests
point #3 above
32. place a recall on an item and try to renew the item and confirm you
are unable to renew recalled items - This tests point #4 above
33. Return the same item and confirm in the OPAC and staff client that
the item is not shown as available - This tests point #5 above
34. Place a recall to one borrower then reserve the same item to a
different borrower. Check the item in and confirm the recall modal is
displayed not the reserve modal as recalls take precedence - This tests
point #6 above

35. In circ and fine rules set a rules 'Fine charge interval period'=1
36. Set the 'Unit' of the circ rule to 'hours', 'Recall due date
interval' = 1, 'Recall overdue fine amount'=1, 'Recall pickup period'=1
37. Check out an item to borrower A and recall it in the OPAC by borrower
B
38. In the database manually change the issues.date_due to 1 hour
before the current time
39. From the Koha shell run './misc/cronjobs/fines.pl'
40. Notice the fine of 1 has been applied to the borrower for being 1
hour late in returning the recall
41. Return the item and confirm the recall. Manually change the waiting
date to more than 1 hour before the current time and run ./misc/cronjobs/overdue_notices.pl
42. Notice the recall is overdue now
- Steps 35-42 test point #7 above

43. Enable 'UseCourseReserves' syspref
44. Check out a course reserve item to a borrower
45. In the OPAC navigate to the course page containing the issued course
reserve and confirm the page loads successfully
46. Recall a course reserve and confirm the recall is successfully
placed
47. Check in the recalled course reserve and confirm the recall - This
tests point #8 above

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 319 Alex Buckley 2018-10-29 21:54:29 UTC
Rebased and re-attached to this bug report. Can you please re-test?
Comment 320 Alex Buckley 2018-10-29 22:05:04 UTC
Created attachment 81595 [details] [review]
Bug 19532: Fixes and enhancements to recalls

This implements the following fixes and enhancements:

* Stopping a waiting recall from being able to be checked out to
patrons other than the patron who placed the recall
* Make the Recall confirmation popup appear everytime a recalled item
is put through returns until it is checked out to recall requester
* Introduce a new notice RECALL_REQUESTER_DET which outlines borrower and item information so the item can be put aside
* Stop recalled items from being renewed
* Stop display of 'Available' for waiting recalls
* Check if recalls exist on an item before checking for reserves
* Added ability to set Recall due date interval, and Recall pickup
period in hours
* Fix the 'Template process error Koha::Item->avail_for_recall' thrown
on course page where a course reserve is currently issued

Test plan:
1. Repeat major test plan - verify all points
2. Place another recall and check it in
3. Try checking the recall out to a different patron and confirm you
are not able to check out a waiting recall to a different patron

4. Check the same item in again and observe that the recall modal is
displayed again and is displayed every time the item is checked in until
the item is checked out to the patron who placed the recall

5. Check the item in again and select the 'Print slip and confirm' and
confirm the RECALL_REQUESTER_DET notice can be printed

6. Place a recall on an item and try to renew the item and confirm you
are unable to renew recalled items

7. Return the same item and confirm in the OPAC and staff client that
the item is not shown as available

8. Place a recall to one borrower then reserve the same item to a
different borrower. Check the item in and confirm the recall modal is
displayed not the reserve modal as recalls take precedence

9. In circ and fine rules set a rules 'Fine charge interval period'=1

10. Set the 'Unit' of the circ rule to 'hours', 'Recall due date
interval' = 1, 'Recall overdue fine amount'=1, 'Recall pickup period'=1

11. Check out an item to borrower A and recall it in the OPAC by borrower
B

12. In the database manually change the issues.date_due to 1 hour
before the current time

13. From the Koha shell run './misc/cronjobs/fines.pl'

14. Notice the fine of 1 has been applied to the borrower for being 1
hour late in returning the recall

15. Return the item and confirm the recall. Manually change the waiting
date to more than 1 hour before the current time and run ./misc/cronjobs/overdue_notices.pl

16. Notice the recall is overdue now
- Steps 9-16 test point #7 above

17. Enable 'UseCourseReserves' syspref
18. Check out a course reserve item to a borrower

19. In the OPAC navigate to the course page containing the issued course
reserve and confirm the page loads successfully

20. Recall a course reserve and confirm recalls works for course
reserves

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 321 Martin Renvoize 2018-10-30 10:37:47 UTC
Applies now, thanks.
Comment 322 Martin Renvoize 2018-10-30 12:27:45 UTC
Created attachment 81618 [details] [review]
Bug 19532: (QA followup) Add missing TT filters
Comment 323 Martin Renvoize 2018-10-30 15:57:49 UTC
I'm working on a number of QA followups.. to save the email spamming I'll upload the final set at the end of my work..
Comment 324 Martin Renvoize 2018-10-30 16:02:35 UTC
I'll be keeping a github branch updated with my work: https://github.com/colinsc/koha/compare/master...PTFS-Europe:bug_19532_recalls#diff-932a11a39c3f8c7127afb9c9a44318e7R349
Comment 325 Alex Buckley 2018-10-30 22:06:42 UTC
Thanks Martin. I have added release notes to the bug report.
Comment 326 Martin Renvoize 2018-10-31 07:20:44 UTC
Created attachment 81652 [details] [review]
Bug 19532: Database updates

Adding the recalls table and the old_recalls table.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 327 Martin Renvoize 2018-10-31 07:20:54 UTC
Created attachment 81653 [details] [review]
Bug 19532: Module files for Recall and OldRecall

Koha/Recall.pm
Koha/Recalls.pm
Koha/Old/Recall.pm
Koha/Old/Recalls.pm

and the schema files for Recall and OldRecall.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 328 Martin Renvoize 2018-10-31 07:21:03 UTC
Created attachment 81654 [details] [review]
Bug 19532: Some DB fixes

Removing the old_recalls table, as suggested in Comment 5
Renaming 'found' column to 'status'
Adding 'old' column

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 329 Martin Renvoize 2018-10-31 07:21:13 UTC
Created attachment 81655 [details] [review]
Bug 19532: Some module fixes

Removing files related to OldRecall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 330 Martin Renvoize 2018-10-31 07:21:21 UTC
Created attachment 81656 [details] [review]
Bug 19532: Circulation rules

Adding 3 new rules and columns to issuingrules
- recall_due_date_interval
- recall_overdue_fine
- recall_shelf_time

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 331 Martin Renvoize 2018-10-31 07:21:29 UTC
Created attachment 81657 [details] [review]
Bug 19532: Recall an item in OPAC

 This patch:
  - adds the 'Recall' button to the item on it's detail page
  - adds ability to place a recall
  - the recall is stored in the recalls table
  - the due date for the checkout is updated to whatever has been set in
  the issuing rule under recall_due_date_interval
  - error messages for if the user isn't logged in, the user tries to
  place a recall on an item they have already recalled, or if storing
  the recall in the db fails for any reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 332 Martin Renvoize 2018-10-31 07:21:37 UTC
Created attachment 81658 [details] [review]
Bug 19532: Cancel recall and see recalls in OPAC

This patch adds ability for user to cancel a recall
They can also see their recalls in the user summary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 333 Martin Renvoize 2018-10-31 07:21:46 UTC
Created attachment 81659 [details] [review]
Bug 19532: Show recalls on intranet side

This patch
- adds Recall tab to the Check out section of member account, and to the
Details section of member account
- Functionality to cancel recalls on staff side
- Fixing cancel on OPAC side (before I was deleting the whole recall
instead of cancelling)
- Fixing validation when checking whether a recall can be placed on an
item that has been recalled by this borrower before. If the old recall
is expired or cancelled then they can make a recall again.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 334 Martin Renvoize 2018-10-31 07:21:56 UTC
Created attachment 81660 [details] [review]
Bug 19532: Fixing broken OPAC recalls table

Forgot to add <tr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 335 Martin Renvoize 2018-10-31 07:22:04 UTC
Created attachment 81661 [details] [review]
Bug 19532: recalls history

this patch
- adds recalls history (similar to holds history) to OPAC and intranet
- edits the tables in opac-user.pl (OPAC), moremember.pl and
circulation.pl (staff) so that it only shows active recalls (recalls
that have been requested or are waiting)
- some extra datatables fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 336 Martin Renvoize 2018-10-31 07:22:13 UTC
Created attachment 81662 [details] [review]
Bug 19532: Recalls queue

This patch adds a recalls queue page to the circulation reports

You can see all recalls made in the system, who requested them, their
status and other relevant info. you can cancel individual or multiple
recalls.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 337 Martin Renvoize 2018-10-31 07:22:21 UTC
Created attachment 81663 [details] [review]
Bug 19532: Overdue recalls report

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 338 Martin Renvoize 2018-10-31 07:22:30 UTC
Created attachment 81664 [details] [review]
Bug 19532: Recalls awaiting pickup report

this patch adds reports for all recalls awaiting pickup, and recalls
that have been waiting more than X days. a syspref,
RecallsMaxPickUpDelay, is added to give a general max shelf time for
recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 339 Martin Renvoize 2018-10-31 07:22:38 UTC
Created attachment 81665 [details] [review]
Bug 19532: Only recall items checked out by other users

... shouldn't be able to recall items that are currently checked out by
yourself.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 340 Martin Renvoize 2018-10-31 07:22:46 UTC
Created attachment 81666 [details] [review]
Bug 19532: UseRecalls syspref

This patch adds a syspref to control the usability of the recalls
feature

Test the following:

Staff side
/includes/circ-menu.inc
/includes/circ-nav.inc
/includes/members-menu.inc
/admin/preferences/circulation.pref
/circ/circulation-home.tt
/circ/circulation.tt
/circ/recalls_overdue.tt
/circ/recalls_queue.tt
/circ/recalls_waiting.tt
/members/moremember.tt
/members/recallshistory.tt

OPAC
/includes/usermenu.inc
/opac-recall.tt
/opac-recalls.tt
/opac-user.tt
/members/recallshistory.pl
/opac/opac-detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 341 Martin Renvoize 2018-10-31 07:22:55 UTC
Created attachment 81667 [details] [review]
Bug 19532: Recall pop up when checking in an item

When checking in an item on the staff side, the staff member will see a
pop up if there is a recall attached to that item. From here, they can
confirm the recall, setting the status to 'Waiting' and updating the
waitingdate. The item will still be checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 342 Martin Renvoize 2018-10-31 07:23:03 UTC
Created attachment 81668 [details] [review]
Bug 19532: Send notice to user to return a recalled item

When the recall is placed in the OPAC, a RETURN_RECALLED_ITEM notice is
sent to the user who has the item checked out, with the updated due
date.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 343 Martin Renvoize 2018-10-31 07:23:11 UTC
Created attachment 81669 [details] [review]
Bug 19532: Send notice to user to pickup recalled returned item

Send a PICKUP_RECALLED_ITEM notice to the user who requested a recall
when the item is checked in.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 344 Martin Renvoize 2018-10-31 07:23:19 UTC
Created attachment 81670 [details] [review]
Bug 19532: Flagging recall as 'old' when expired or cancelled

Set 'old' flag to 1 if cancelling or expiring a recall

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 345 Martin Renvoize 2018-10-31 07:23:27 UTC
Created attachment 81671 [details] [review]
Bug 19532: Cronjob to check for overdue recalls

This patch adds a check to the overdue_notices cronjob, so if any of the
overdue issues are also recalls, the status will be set to O (overdue)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 346 Martin Renvoize 2018-10-31 07:23:36 UTC
Created attachment 81672 [details] [review]
Bug 19532: Tests for Koha/Recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 347 Martin Renvoize 2018-10-31 07:23:44 UTC
Created attachment 81673 [details] [review]
Bug 19532: Nice message if no recalls for opac recalls history

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 348 Martin Renvoize 2018-10-31 07:23:53 UTC
Created attachment 81674 [details] [review]
Bug 19532: POD fix, renaming methods

Tomas's comments:
- renaming 'Class methods' to 'internal methods'
- renaming 'borrower' and 'branch' methods to 'patron' and 'library'

other comments are out of date with current patches and do not need to
be actioned

when testing, confirm all data still shows as expected and nothing is
broken

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 349 Martin Renvoize 2018-10-31 07:24:02 UTC
Created attachment 81675 [details] [review]
Bug 19532: Extra fixes

This patch addresses some of Liz's comments in Comment 37

- shows new due date on opac-recall.pl when the recall is requested
- shows new due date on opac-recalls.pl recalls history
- shows new due date on circ/recalls_queue.pl
- syspref is default off
- recalls tab on catalogue/detail.pl
- show that there is a recall on an item on catalogue/detail.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 350 Martin Renvoize 2018-10-31 07:24:10 UTC
Created attachment 81676 [details] [review]
Bug 19532: Notices for recalls

The notices:

-RETURN_RECALLED_ITEM
-PICKUP_RECALLED_ITEM

have been created and added to sample_notices.sql
Changed tools/letter.pl to use recalls table

Added notices to translated installers

https://bugs.koha-community.org/show_bug.cgi?id=19523

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 351 Martin Renvoize 2018-10-31 07:24:18 UTC
Created attachment 81677 [details] [review]
Bug 19532: Extra fixes from Comment 68

This patch fixes the following:

The db uppdate tries to insert after 'notes' in issuing rules, but this
doesn't exist

When placing recall I always get a warning:
    <p><strong>Warning</strong>: Your library does not allow recalls for
    x item types.</p>

Cancelling recall from 'Recall history tab' doesn't work

If patron has no recalls there is 'Patron has no current recalls'
message at bottom of tabs on checkout and details tabs for patron

When confirming a recall if the item is from another branch I get a
transfer generated as well as confirming hold for recall
    Feature now checks if the recall branch is the same as the item
    holding branch when checking in item to determine if transfer is
    required

On recalls awaiting pickup:
need to update recall.borrower to recall.patron - causing
internal server error

When placing a recall - if I hit 'back' after confirming and
confirm again I get a second recall on the same item

Recalls queue should have waiting date information
Recalls queue should have a way to hide cancelled, I would
expect closed recalls to be hidden by default
    Recalls queue now hides old (cancelled/expired/finished) recalls by
    default and has a checkbox to toggle this

When viewing a patrons account in the staff side we should see
that a checkout has an active recall

Checking out the recall doesn't seem to close the recall
    Added an 'F' status for finished/closed recalls

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Conflicts:
	Koha/Schema/Result/Borrower.pm
Comment 352 Martin Renvoize 2018-10-31 07:24:26 UTC
Created attachment 81678 [details] [review]
Bug 19532: (follow-up) Update characterset for recalls table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 353 Martin Renvoize 2018-10-31 07:24:34 UTC
Created attachment 81679 [details] [review]
Bug 19532: Improve and refine recalls functionality

Only allow 1 recall per item
When checking in only check for holds if no reserves found
Add a T/transferring status for recalls, only confirm them once arrived
Improve message when checking in recall
Fix clashing ids on recall-history
Check if patron can hold item before allowing recall
Prevent multiple recalls when pressing back button
Select/fill only active recall when issuing

To test:
1 - Repeat major test plan - verify all points
2 - Attempt to place multiple recallsusing back button, should fail
3 - Set all item level holds to not allowed, should not be able to place
recall
4 - Check-in recall at branch other than destination, should be in
transit
5 - Confirm at correct branch, should send message and get expiration
date etc.
6 - Return to another branch, should eb in transit again
7 - Play with circ rules and verify only allowed patrons can place
recall

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 354 Martin Renvoize 2018-10-31 07:24:42 UTC
Created attachment 81680 [details] [review]
Bug 19532: Fixes and enhancements to recalls

This implements the following fixes and enhancements:

* Stopping a waiting recall from being able to be checked out to
patrons other than the patron who placed the recall
* Make the Recall confirmation popup appear everytime a recalled item
is put through returns until it is checked out to recall requester
* Introduce a new notice RECALL_REQUESTER_DET which outlines borrower and item information so the item can be put aside
* Stop recalled items from being renewed
* Stop display of 'Available' for waiting recalls
* Check if recalls exist on an item before checking for reserves
* Added ability to set Recall due date interval, and Recall pickup
period in hours
* Fix the 'Template process error Koha::Item->avail_for_recall' thrown
on course page where a course reserve is currently issued

Test plan:
1. Repeat major test plan - verify all points
2. Place another recall and check it in
3. Try checking the recall out to a different patron and confirm you
are not able to check out a waiting recall to a different patron

4. Check the same item in again and observe that the recall modal is
displayed again and is displayed every time the item is checked in until
the item is checked out to the patron who placed the recall

5. Check the item in again and select the 'Print slip and confirm' and
confirm the RECALL_REQUESTER_DET notice can be printed

6. Place a recall on an item and try to renew the item and confirm you
are unable to renew recalled items

7. Return the same item and confirm in the OPAC and staff client that
the item is not shown as available

8. Place a recall to one borrower then reserve the same item to a
different borrower. Check the item in and confirm the recall modal is
displayed not the reserve modal as recalls take precedence

9. In circ and fine rules set a rules 'Fine charge interval period'=1

10. Set the 'Unit' of the circ rule to 'hours', 'Recall due date
interval' = 1, 'Recall overdue fine amount'=1, 'Recall pickup period'=1

11. Check out an item to borrower A and recall it in the OPAC by borrower
B

12. In the database manually change the issues.date_due to 1 hour
before the current time

13. From the Koha shell run './misc/cronjobs/fines.pl'

14. Notice the fine of 1 has been applied to the borrower for being 1
hour late in returning the recall

15. Return the item and confirm the recall. Manually change the waiting
date to more than 1 hour before the current time and run ./misc/cronjobs/overdue_notices.pl

16. Notice the recall is overdue now
- Steps 9-16 test point #7 above

17. Enable 'UseCourseReserves' syspref
18. Check out a course reserve item to a borrower

19. In the OPAC navigate to the course page containing the issued course
reserve and confirm the page loads successfully

20. Recall a course reserve and confirm recalls works for course
reserves

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 355 Martin Renvoize 2018-10-31 07:24:50 UTC
Created attachment 81681 [details] [review]
Bug 19532: (QA follow-up) Add missing TT filters
Comment 356 Martin Renvoize 2018-10-31 07:24:57 UTC
Created attachment 81682 [details] [review]
Bug 19532: (QA follow-up) Use Asset plugin for css
Comment 357 Martin Renvoize 2018-10-31 07:25:06 UTC
Created attachment 81683 [details] [review]
Bug 19532: (QA follow-up) Fix collation in kohastructure.sql
Comment 358 Martin Renvoize 2018-10-31 07:42:10 UTC
I've uploaded an updated patchset with some simple followups added.

However, I've got a few code review comments, and I've not got to the full testing of the feature itself yet. I don't think this is likely to be ready for 18.11 personally, but it would be good to get the groundwork done to get it in at the beginning of the next cycle.

Review:
This really feels like it should be built atop the existing Holds/Reserves system. Everyone I've spoken to, to date, has been really surprised that it appears to be an entirely distinct feature.  It also feels like allot of code was borrowed from reserves, leading to repetition. Putting that aside for now, however:
1) Please update the POD for C4::Circulation::transferbook to state how the functionality has changed
2) There is commented out code in the above routine which looks as though it needs more thought
3) Shouldn't the librarian be able to override a recalls at checkout the same way they can override a reserve (based on sysprefs I believe)
4) Please document the recalls status codes somewhere
5) C4::Circulation::AddReturn - There are superfluous DB calls here I believe
6) Reserves/Holds take precedence over Recalls during renewal, is that deliberate (everywhere else it seems to be the opposite way around)
7) Superfluous `use Data::Dumper` in C4::Letters
8) I couldn't work out from the code how this affects fines.. only that is does
9) I don't understand why you've changed Koha/Patron.pm
10) Superfluous `use Data::Dumper` in catalogue/detail.pl
11) Why 3 distinct DB hits in catalogue/detail.pl
12) circ/recall-pickup-slip.pl appears to contain unused imports
13) circ/recalls_overdue.pl, circ/recalls_queue.pl, circ/recalls_waiting all have references to Fast Cataloguing.. not sure why
14) Why the mix of filenames with underscores and hyphens?
15) circ/returns.pl has commented out code, leaving the feeling that it needs further thought
16) atomicupdate .sql files should be converted to .perl and use the template.
17) Rebase issue has resulted in SR_SLIP being contained within many of the sql files
18) All JS should be pushed to the bottom of the file now as per recent(ish) guidelines.. I think this has partially been done, but some cases have been missed.

Lots of little things.. now I need to fully test the feature to really get to grips with why it's entirely distinct from Reserves.  I wish there was a full RFC we could see and a Work In Progress branch for updating the manual. I'm struggling to pick out the whole modus operandi of this patch as it's not what anyone here understands 'recalls' to be.

Hopefully, we can keep this moving along.. sorry it's not all good news, but I am keen to help get it moving again.