Bug 10493

Summary: Add renewal script
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: CirculationAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact:
Severity: new feature    
Priority: P5 - low CC: gmcharlt, gwilliams, kyle.m.hall, lzuares, nengard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 8798    
Bug Blocks:    
Attachments: Bug 10493 - Add renewal script
Bug 10493 - Add renewal script
[SIGNED-OFF] Bug 10493 - Add renewal script
Bug 10493 [Template follow-up] Add renewal script
Bug 10493 [Template follow-up] Add renewal script
Bug 10493 - Add renewal script
Bug 10493 [Template follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
Bug 10493 [QA follow-up] Add renewal script
[PASSED QA] Bug 10493 - Add renewal script
[PASSED QA] Bug 10493 [Template follow-up] Add renewal script
[PASSED QA] Bug 10493 [QA follow-up] Add renewal script

Description Kyle M Hall (khall) 2013-06-19 14:39:11 UTC
Koha needs a renewal tool that functions similar to the returns where a librarian can continuously scan items for renewal. This script should block renewals that are impossible, and allow the same renewal overrides as circulation.pl
Comment 1 Kyle M Hall (khall) 2013-06-19 14:46:38 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2013-08-01 16:52:23 UTC Comment hidden (obsolete)
Comment 3 HB-NEKLS 2013-08-01 17:25:08 UTC
I, Heather Braum, from NEKLS sign off on this patch. We have tested it and it works.
Comment 4 Owen Leonard 2013-08-01 18:49:32 UTC
I would like to test this too but it doesn't apply.

Applying: Bug 10493 - Add renewal script
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): Koha/Schema/Result/Item.pm deleted in HEAD and modified in Bug 10493 - Add renewal script. Version Bug 10493 - Add renewal script of Koha/Schema/Result/Item.pm left in tree.
CONFLICT (modify/delete): Koha/Schema/Result/Issue.pm deleted in HEAD and modified in Bug 10493 - Add renewal script. Version Bug 10493 - Add renewal script of Koha/Schema/Result/Issue.pm left in tree.
Failed to merge in the changes.
Comment 5 Owen Leonard 2013-08-01 18:59:44 UTC
Oh sorry, probably the dependency, which I missed.
Comment 6 Owen Leonard 2013-08-01 19:54:07 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2013-08-01 19:55:25 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall (khall) 2013-08-07 12:55:10 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2013-10-11 19:41:22 UTC
*** Bug 7632 has been marked as a duplicate of this bug. ***
Comment 10 Kyle M Hall (khall) 2013-10-18 22:15:54 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall (khall) 2013-10-18 22:16:07 UTC Comment hidden (obsolete)
Comment 12 Katrin Fischer 2013-10-20 21:17:45 UTC
Hi Kyle,

2 small things: 

Can you please take a look at the GPL version for renew.pl and see if you can update it to GPL3?

Also: You are using the KohaBranchName plugin and I think we are going to standardize to use Branches instead (see bug 10626.
-[% USE KohaBranchName %]
+[% USE Branches %]

So could you switch it please? 

Continuing testing, as both things are small and easy to check in a follow up later.
Comment 13 Katrin Fischer 2013-10-20 21:26:45 UTC
Hi Kyle,

another thing: when I renew an item where the title has an umlaut (Ex. Die Räuber), the umlaut is not shown right in the "can't renew" message.

Please fix and switch back to signed off. Thx!
Comment 14 Kyle M Hall (khall) 2013-10-20 23:54:57 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall (khall) 2013-10-21 20:47:15 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall (khall) 2013-10-21 21:21:43 UTC Comment hidden (obsolete)
Comment 17 Kyle M Hall (khall) 2013-10-21 21:37:05 UTC Comment hidden (obsolete)
Comment 18 Kyle M Hall (khall) 2013-10-21 21:42:21 UTC Comment hidden (obsolete)
Comment 19 Kyle M Hall (khall) 2013-10-21 21:50:30 UTC Comment hidden (obsolete)
Comment 20 Kyle M Hall (khall) 2013-10-21 22:02:12 UTC Comment hidden (obsolete)
Comment 21 Kyle M Hall (khall) 2013-10-21 22:07:29 UTC Comment hidden (obsolete)
Comment 22 Kyle M Hall (khall) 2013-10-21 22:10:36 UTC Comment hidden (obsolete)
Comment 23 Kyle M Hall (khall) 2013-10-21 22:11:21 UTC Comment hidden (obsolete)
Comment 24 Katrin Fischer 2013-10-22 00:06:54 UTC
Created attachment 22241 [details] [review]
[PASSED QA] Bug 10493 - Add renewal script

Koha needs a renewal tool that functions similar to the returns where a
librarian can continuously scan items for renewal. This script should
block renewals that are impossible, and allow the same renewal overrides
as circulation.pl

Test plan:
 1) Apply the patches for bug 8798
 2) Apply this patch
 3) Browse to /cgi-bin/koha/circ/renew.pl
 4) Enter an invalid barcode, you should get an error message
 5) Enter a valid, but not checked out barcode, you should get an error
    message.
 6) Enter a valid barcode that is checkout out and should be renewable,
    you should get a success message.
 7) Enable AllowRenewalLimitOverride
 8) Enter a barcode for an item that has been renewed too many times
 9) You should get a warning which you can override.
10) Disable AllowRenewalLimitOverride
11) Repeat steap 8
12) You should get a blocking error message
11) Enter a barcode for an item with unfilled holds on it,
    you should get an overridable warning

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Passes all tests and QA script, some issues have been
addressed in follow-ups.
Comment 25 Katrin Fischer 2013-10-22 00:07:09 UTC
Created attachment 22242 [details] [review]
[PASSED QA] Bug 10493 [Template follow-up] Add renewal script

This template followup fixes some minor template errors and adds some
style to dialog buttons matching those seen on the circulation page.

To test, submit barcodes to trigger the various error conditions:
Non-existant barcode, over the renew limit, restricted patron, item on
hold. Override and Ignore buttons should be properly styled and
functional.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 26 Katrin Fischer 2013-10-22 00:07:17 UTC
Created attachment 22243 [details] [review]
[PASSED QA] Bug 10493 [QA follow-up] Add renewal script

Adds a new Template Toolkit filter EncodeUTF8 to encode strings
to utf8 for correct display of diactritics.

Adds the new JavaScript function removeFocus() to staff-global.js
Use this function to remove the focus from any element for
repeated scanning actions on errors so the librarian doesn't
continue scanning and miss the error.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This works as described - you have to actually look at the
error and pick what you want to do or confirm it. I think
maybe tying the action to a shortcut (c = confirm or similar)
would be nice, so you can get away with only using the keyboard.
Comment 27 Galen Charlton 2013-10-22 21:02:41 UTC
Pushed to master.  Thanks, Kyle!