From dd69c34eaf7643783d4604d25aafb893277eb054 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 14 Feb 2022 18:38:16 +0000 Subject: [PATCH] Bug 30098: Only redirect from patron search if single result is on first page MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch simply adds a check that we are oin the first page (starting at result 0) before redirecting to a isngle patron 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 - Go to third page of results, redirected to the patron 4 - Apply patch 5 - Repeat search and paging 6 - On third page you remian in results and are not redirected to patron Signed-off-by: Emmanuel Bétemps Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit e77ca95756919ab1630a35b1c69e0fdc41289f27) Signed-off-by: Andrew Fuerste-Henry --- 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 d51b6fe296..7dcb341834 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -448,7 +448,7 @@ 'data': aoData, 'success': function(json){ // redirect if there is only 1 result. - if ( json.aaData.length == 1 ) { + if ( json.aaData.length == 1 && aoData.iDisplayStart == 0 ) { var borrowernumber = json.aaData[0].borrowernumber; document.location.href="/cgi-bin/koha/members/moremember.pl?borrowernumber="+borrowernumber; return false; -- 2.39.5