Bug 29637 - AutoSwitchPatron is broken since Bug 26352
Summary: AutoSwitchPatron is broken since Bug 26352
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Michael Hafen
QA Contact: Testopia
URL:
Keywords: regression, rel_21_11_candidate
Depends on:
Blocks:
 
Reported: 2021-12-03 18:42 UTC by Michael Hafen
Modified: 2022-12-12 21:24 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes an issue introduced by bug 26352 in 21.11 that caused the AutoSwitchPatron system preference to no longer work. (When AutoSwitchPatron is enabled and a patron barcode is scanned instead of a book, it automatically redirects to the patron.)
Version(s) released in:
22.05.00,21.11.01


Attachments
Proposed fix (1.51 KB, patch)
2021-12-03 18:47 UTC, Michael Hafen
Details | Diff | Splinter Review
Bug 29637: AutoSwitchPatron should look for card number in the barcode (1.51 KB, patch)
2021-12-04 02:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 29637: AutoSwitchPatron should look for card number in the barcode (1.59 KB, patch)
2021-12-06 12:45 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hafen 2021-12-03 18:42:40 UTC
Bug 26352 changed the line in circ/circulation.pl that searches for a patron card number in the barcode field from using the $barcode variable to the $findborrower variable.  This breaks AutoSwitchPatron.
Comment 1 Michael Hafen 2021-12-03 18:47:20 UTC
Created attachment 128232 [details] [review]
Proposed fix

Test plan:

1. make sure AutoSwitchPatron system preference is on.
2. get two patron card numbers.
3. enter the first card number to check out to the patron.
4. enter the second card number in the item barcode field.
5. observe that the barcode is not found.

6. apply patch

7. enter the second card number in the item barcode field again.
8. observe that the second patron is loaded to check out to.
Comment 2 David Nind 2021-12-04 02:51:36 UTC
Created attachment 128240 [details] [review]
Bug 29637: AutoSwitchPatron should look for card number in the barcode

Bug 26352 changed the line in circ/circulation.pl that searches for a
patron card number in the barcode field from using the $barcode variable
to the $findborrower variable.  This breaks AutoSwitchPatron.

Test plan:

1. make sure AutoSwitchPatron system preference is on.
2. get two patron card numbers.
3. enter the first card number to check out to the patron.
4. enter the second card number in the item barcode field.
5. observe that the barcode is not found.

6. apply patch

7. enter the second card number in the item barcode field again.
8. observe that the second patron is loaded to check out to.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2021-12-06 12:45:41 UTC
Created attachment 128275 [details] [review]
Bug 29637: AutoSwitchPatron should look for card number in the barcode

Bug 26352 changed the line in circ/circulation.pl that searches for a
patron card number in the barcode field from using the $barcode variable
to the $findborrower variable.  This breaks AutoSwitchPatron.

Test plan:

1. make sure AutoSwitchPatron system preference is on.
2. get two patron card numbers.
3. enter the first card number to check out to the patron.
4. enter the second card number in the item barcode field.
5. observe that the barcode is not found.

6. apply patch

7. enter the second card number in the item barcode field again.
8. observe that the second patron is loaded to check out to.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 David Nind 2021-12-06 18:46:42 UTC
Note that bug 26352 no longer seems to work (unless I set things up wrong) - see my note on the bug.
Comment 5 Fridolin Somers 2021-12-06 23:17:40 UTC
(In reply to David Nind from comment #4)
> Note that bug 26352 no longer seems to work (unless I set things up wrong) -
> see my note on the bug.

I've tested with KitchenSink and pull-request :
https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/pull/17

All good.
Comment 6 David Nind 2021-12-07 01:31:57 UTC
(In reply to Fridolin Somers from comment #5)
> All good.

Excellent!
Comment 7 Fridolin Somers 2021-12-07 20:44:57 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2021-12-10 12:06:18 UTC
Pushed to 21.11.x for 21.11.01
Comment 9 Andrew Fuerste-Henry 2021-12-17 19:33:47 UTC
Missing dependency, not backported to 21.05.x