[Bug 30098] New: Patron search redirects when one result on any page of results
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Bug ID: 30098 Summary: Patron search redirects when one result on any page of results Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The patron search has a redirect built in to send you directly to the patron if there is only a single result from your search. This is also triggered, however, when a later page has only 1 result To recreate: 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 130564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130564&action=edit Bug 30098: ONly redirect from patron search if single result is on first page 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130564|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 130626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130626&action=edit Bug 30098: ONly redirect from patron search if single result is on first page 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 e.betemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |e.betemps@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I've fixed that on by 30063 by testing json.iTotalDisplayRecords == 1, I think it's the correct way to do. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 131191 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131191&action=edit Bug 30098: Only redirect from patron search if single result is on first page 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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #130626|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hmm, just read Jonathans comment.. I think he's right, that's a slightly cleaner solution with one less test. I'll PQA as there's not real issue with this code and leave it to the RM to decide which of the two options is 'nicest'... we can always have the solution from bug 30063 once that's worked it's way through anyway. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30063 CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Mmmm tiny patch and it works, I push and send my best wishes to Bug 30063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.04 released in| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.04 |22.05.00,21.11.04,21.05.13 released in| | CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This does not work. There is no redirect if only 1 patron is returned. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30325 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30325 [Bug 30325] (Bug 30098 follow-up) Broken patron search redirect when one result -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #11)
This does not work. There is no redirect if only 1 patron is returned.
Oh crap ! We did not saw this. I've opened Bug 30325. The fix from comment 3 looks perfect. Lets validate it fast for this month release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.04,21.05.13 |22.05.00,21.11.04 released in| | --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #9)
Pushed to 21.05.x for 21.05.13
I've reverted this in 21.05.x, it is no longer backported. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30098 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #13)
(In reply to Andrew Fuerste-Henry from comment #9)
Pushed to 21.05.x for 21.05.13
I've reverted this in 21.05.x, it is no longer backported.
I think you should pick bug 30325 then. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org