Bug 12066 - New renew page in staff client doesn't record branch in statistics
Summary: New renew page in staff client doesn't record branch in statistics
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 14:23 UTC by Nicole C. Engard
Modified: 2016-12-05 21:22 UTC (History)
7 users (show)

See Also:
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 (1.08 KB, patch)
2015-05-20 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12066: New renew page in staff client doesn't record branch in statistics (1.21 KB, patch)
2015-05-29 18:21 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 12066: New renew page in staff client doesn't record branch in statistics (1.26 KB, patch)
2015-05-31 21:09 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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