Bug 19532 - Recalls for Koha
Summary: Recalls for Koha
Status: Needs Signoff
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:
Depends on:
Blocks:
 
Reported: 2017-10-25 23:27 UTC by Liz Rea
Modified: 2018-09-14 22:26 UTC (History)
16 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:


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

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