Bugzilla – Attachment 131993 Details for
Bug 30325
(Bug 30098 follow-up) Broken patron search redirect when one result
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30325: (Bug 30098 follow-up) Fix broken patron search redirect when one result
Bug-30325-Bug-30098-follow-up-Fix-broken-patron-se.patch (text/plain), 1.80 KB, created by
Fridolin Somers
on 2022-03-21 22:22:12 UTC
(
hide
)
Description:
Bug 30325: (Bug 30098 follow-up) Fix broken patron search redirect when one result
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-03-21 22:22:12 UTC
Size:
1.80 KB
patch
obsolete
>From d37add59046a35b5000eb098ebdeaa2a64b48d79 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 21 Mar 2022 12:18:57 -1000 >Subject: [PATCH] Bug 30325: (Bug 30098 follow-up) Fix broken patron search > redirect when one result > >Bug 30098 fixed patron search behavior when a later page has only 1 result, but broke the redirect when there is only a single result from search. > >To test: >1 - Perform a patron search that returns 41 results, on koha-testing-docker, 'a' works >2 - Go to second page of results, works >3 - On third page you remain in results and are not redirected >4 - Perform a patron search that return only 1 result, name or cardnumber >5 - You get redirected to this patron page >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 5c779cc6b0..fd37ab2e51 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -440,7 +440,7 @@ > 'data': aoData, > 'success': function(json){ > // redirect if there is only 1 result. >- if ( json.aaData.length == 1 && aoData.iDisplayStart == 0 ) { >+ if ( json.iTotalDisplayRecords == 1 ) { > var borrowernumber = json.aaData[0].borrowernumber; > /* Overwrite history state of firstletter search since only one result was returned; This prevents a loop upon clicking back */ > history.replaceState( {}, null, window.location.href.split("?" )[0]); >-- >2.35.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30325
:
131993
|
132008
|
132015