Bug 12066

Summary: New renew page in staff client doesn't record branch in statistics
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: CirculationAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, gmcharlt, kyle.m.hall, kyle, mtj, tomascohen, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12066 - New renew page in staff client doesn't record branch in statistics
[SIGNED-OFF] Bug 12066: New renew page in staff client doesn't record branch in statistics
[PASSED QA] Bug 12066: New renew page in staff client doesn't record branch in statistics

Description Nicole C. Engard 2014-04-10 14:23:28 UTC
The  OpacRenewalBranch  is set to renew at the library the item was checked out, but it seem that all renewals are being recorded as NULL.

mysql> select count(*) from statistics where branch is null;
+----------+
| count(*) |
+----------+
|      457 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from statistics where type='renew' and branch is null;
+----------+
| count(*) |
+----------+
|      457 |
+----------+
1 row in set (0.03 sec)
Comment 1 Owen Leonard 2014-04-10 19:07:10 UTC
As far as I can tell this bug only affects renewals which are done through the new renew script (circ/renew.pl). I tried doing renewals through the OPAC (both by clicking on the link and by checking boxes and submitting the form) and in the staff client (by scanning a barcode in the checkout form and by checking boxes in the table of checked out items).

Only when I use circ/renew.pl does the branch end up NULL.

I notice that opac-renew.pl contains all the logic for determining which branch should be passed to AddRenewal(). I would think that logic should be separated out so that it doesn't have to be duplicated.
Comment 2 Owen Leonard 2014-04-10 19:29:13 UTC
> I notice that opac-renew.pl contains all the logic for determining which
> branch should be passed to AddRenewal().

Which, now that I actually think it through, is unnecessary for circ/renew.pl because we have the logged-in branch to pass to AddRenewal.
Comment 3 Kyle M Hall 2015-05-20 15:34:07 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2015-05-29 18:21:44 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-05-31 21:09:01 UTC
Created attachment 39722 [details] [review]
[PASSED QA] Bug 12066: New renew page in staff client doesn't record branch in statistics

Test Plan:
1) Apply this patch
2) Renew an item via circ/renew.pl
3) Note the branch code of your logged in library is set as the
   branch in the generated statistic line

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested pre and post patch, now branch is saved
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2015-06-01 17:17:35 UTC
Patch pushed to master.

Thanks Kyle!
Comment 7 Chris Cormack 2015-06-03 07:59:22 UTC
Pushed to 3.20.x will be in 3.20.1
Comment 8 Liz Rea 2015-06-22 22:39:29 UTC
Patch pushed to 3.18.x will be in 3.18.08
Comment 9 Mason James 2015-07-25 09:50:27 UTC
Pushed to 3.16.x, will be in 3.16.13