Bug 29411

Summary: Single result for checkout search by name should redirect to check out tab
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Nick Clemens <nick>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, aspencatteam, estherm, eveal, gmcharlt, jonathan.druart+koha, kyle.m.hall, kyle, lisetteslatah, lucas, martin.renvoize, rcoert
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30653
Change sponsored?: --- Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00
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 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 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 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 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 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 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?