Bug 14842 - Wrong call to GetBranchItemRule in circ/returns.pl
Summary: Wrong call to GetBranchItemRule in circ/returns.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 7981
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 08:06 UTC by Jonathan Druart
Modified: 2016-06-21 21:40 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14842: Wrong call to GetBranchItemRule (1.01 KB, patch)
2015-09-17 08:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14842: Wrong call to GetBranchItemRule (1.11 KB, patch)
2015-09-23 11:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[PASSED QA] Bug 14842: Wrong call to GetBranchItemRule (1.13 KB, patch)
2015-10-01 21:04 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 Jonathan Druart 2015-09-17 08:06:31 UTC
From bug 7981:

circ/returns.pl around l. 276

my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype)->{'returnbranch'} || "homebranch";

GetBranchItemRule expects an itemtype, a scalar.
Here $itemtype is a hashref returned by C4::ItemType->get.

This must be blocker for the next release.
Comment 1 Jonathan Druart 2015-09-17 08:07:59 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2015-09-23 11:47:34 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-09-29 21:31:09 UTC
Hi Jonathan or Marcel - can you please add a test plan to this?
Comment 4 Jonathan Druart 2015-10-01 11:09:04 UTC
If I remember correctly you must use an itemtype with a return policy.
Whatever the value of the policy, the return branch will always be the homebranch.
Comment 5 Katrin Fischer 2015-10-01 21:04:19 UTC
Created attachment 43035 [details] [review]
[PASSED QA] Bug 14842: Wrong call to GetBranchItemRule

From bug 7981:

GetBranchItemRule expects an itemtype, a scalar.
Here $itemtype is a hashref returned by C4::ItemType->get.
So $itemtype->{itemtype} should be passed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2015-10-02 15:11:09 UTC
Patch pushed to master.

Thanks Jonathan!