Bugzilla – Attachment 130626 Details for
Bug 30098
Patron search redirects when one result on any page of results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30098: ONly redirect from patron search if single result is on first page
Bug-30098-ONly-redirect-from-patron-search-if-sing.patch (text/plain), 1.90 KB, created by
Kyle M Hall (khall)
on 2022-02-15 15:39:47 UTC
(
hide
)
Description:
Bug 30098: ONly redirect from patron search if single result is on first page
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-02-15 15:39:47 UTC
Size:
1.90 KB
patch
obsolete
>From 033a316188e4ae2b95a14da787894036aa5f4ef1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >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=UTF-8 >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 <e.betemps@gmail.com> >--- > 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 82d3a5bbb4..87be76a683 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 ) { >+ if ( json.aaData.length == 1 && aoData.iDisplayStart == 0 ) { > 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.30.2
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 30098
:
130564
|
130626
|
131191