Bug 29411

Summary: Single result for checkout search by name should redirect to check out tab
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, aspencatteam, edward.m.veal, esther.melander, gmcharlt, jonathan.druart, kyle.m.hall, kyle, lisettepalouse+koha, lucas, martin.renvoize, rcoert
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30653
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Bug Depends on: 15812    
Bug Blocks:    
Attachments: Bug 29411: Redirect to circulation if circsearch is true
Bug 29411: Redirect to circulation if circsearch is true
Bug 29411: Redirect to circulation if circsearch is true
Bug 29411: Redirect to circulation if circsearch is true

Description Nick Clemens (kidclamp) 2021-11-04 06:50:32 UTC
In bug 15812 the code was switched to redirect to members.pl if a single hit was not found by barcode. The members results page redirects to moremember if a single result is returned to the template.

In the case of a 'circsearch' we should redirect to checkout, not member details
Comment 1 Nick Clemens (kidclamp) 2021-11-04 06:53:49 UTC
Created attachment 127287 [details] [review]
Bug 29411: Redirect to circulation if circsearch is true

TO test:
 1 - Have a patron with a unique surname i.e. Acosta
 2 - Enter the surename into 'Search patrons' box on staff homepage
 3 - You are redirected to 'members/moremember.pl'
 4 - Enter the surname into 'Check out' box at top of page
 5 - You are redirected to 'members/moremember.pl'
 6 - Apply patch
 7 - Enter the surename into 'Search patrons' box on staff homepage
 8 - You are redirected to 'members/moremember.pl'
 9 - Enter the surname into 'Check out' box at top of page
10 - You are redirected to 'circ/circulationr.pl'
Comment 2 Owen Leonard 2021-11-04 10:31:17 UTC
I see one issue with this: If you open the Patrons page and use the sidebar form to search, a single result redirects to circulation instead of details. I don't think this would make my staff complain at all but I think it's not what is technically expected.
Comment 3 Nick Clemens (kidclamp) 2021-11-04 11:17:19 UTC
Created attachment 127293 [details] [review]
Bug 29411: Redirect to circulation if circsearch is true

TO test:
 1 - Have a patron with a unique surname i.e. Acosta
 2 - Enter the surename into 'Search patrons' box on staff homepage
 3 - You are redirected to 'members/moremember.pl'
 4 - Enter the surname into 'Check out' box at top of page
 5 - You are redirected to 'members/moremember.pl'
 6 - Apply patch
 7 - Enter the surename into 'Search patrons' box on staff homepage
 8 - You are redirected to 'members/moremember.pl'
 9 - Enter the surname into 'Check out' box at top of page
10 - You are redirected to 'circ/circulationr.pl'
Comment 4 Owen Leonard 2021-11-04 11:21:54 UTC
Created attachment 127294 [details] [review]
Bug 29411: Redirect to circulation if circsearch is true

TO test:
 1 - Have a patron with a unique surname i.e. Acosta
 2 - Enter the surename into 'Search patrons' box on staff homepage
 3 - You are redirected to 'members/moremember.pl'
 4 - Enter the surname into 'Check out' box at top of page
 5 - You are redirected to 'members/moremember.pl'
 6 - Apply patch
 7 - Enter the surename into 'Search patrons' box on staff homepage
 8 - You are redirected to 'members/moremember.pl'
 9 - Enter the surname into 'Check out' box at top of page
10 - You are redirected to 'circ/circulation.pl'

Signed-off-by: Owen <oleonard@myacpl.org>
Comment 5 Martin Renvoize (ashimema) 2021-11-04 13:51:30 UTC
Created attachment 127323 [details] [review]
Bug 29411: Redirect to circulation if circsearch is true

TO test:
 1 - Have a patron with a unique surname i.e. Acosta
 2 - Enter the surename into 'Search patrons' box on staff homepage
 3 - You are redirected to 'members/moremember.pl'
 4 - Enter the surname into 'Check out' box at top of page
 5 - You are redirected to 'members/moremember.pl'
 6 - Apply patch
 7 - Enter the surename into 'Search patrons' box on staff homepage
 8 - You are redirected to 'members/moremember.pl'
 9 - Enter the surname into 'Check out' box at top of page
10 - You are redirected to 'circ/circulation.pl'

Signed-off-by: Owen <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2021-11-04 13:51:49 UTC
All works as expected, nice fix.

Passing QA
Comment 7 Jonathan Druart 2021-11-05 11:15:13 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 8 Lucas Gass (lukeg) 2021-11-09 20:47:07 UTC
Any chance we can get a 21.05 backport of this one?
Comment 9 Ed Veal 2021-12-15 21:29:44 UTC
I agree with Lucas, can we get this back ported to 21.05?