Bug 15463 - view_holdsqueue.tt uses a search for cardnumber instead of borrowernumber direct link
Summary: view_holdsqueue.tt uses a search for cardnumber instead of borrowernumber dir...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-04 22:26 UTC by Nick Clemens (kidclamp)
Modified: 2018-12-03 20:05 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2016-01-04 22:26:13 UTC
This line:
<td class="hq-patron"><p><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% itemsloo.cardnumber %]#reserves">

Should be:
<td class="hq-patron"><p><a href="cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">

or something similar
Comment 1 Jonathan Druart 2016-01-05 13:49:46 UTC
I don't understand what is the problem here.
Comment 2 Nick Clemens (kidclamp) 2016-02-18 16:28:40 UTC
It seems like we add a call to GetMember to get the borrowernumber from the cardnumber when we could just as easily provide the borrowernumber directly.

Maybe it doesn't have an impact, just feels like it would be more clean the other way.


(In reply to Jonathan Druart from comment #1)
> I don't understand what is the problem here
Comment 3 Jonathan Druart 2016-02-19 15:40:21 UTC
circ/circulation.pl expects a cardnumber:

246 if ($findborrower) {
247     my $borrower = C4::Members::GetMember( cardnumber => $findborrower );
248     if ( $borrower ) {
249         $borrowernumber = $borrower->{borrowernumber};
250     } else {

If not found, the script will try and search the $findborrower using the C4::Utils::DataTables::Members::search subroutine.

We will have to change all occurrences if we want to change this behavior, not only view_holdsqueue.tt
Comment 4 Katrin Fischer 2018-03-31 07:13:36 UTC
It look slike this has been resovled, maybe with another patch set:

/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#reserves