[Koha-bugs] [Bug 36139] Bug 35518 follow-up: fix AutoSwitchPatron

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 15 21:33:01 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36139

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Patch doesn't apply
                 CC|                            |david at davidnind.com

--- Comment #4 from David Nind <david at davidnind.com> ---
The patch(es) didn't apply for me - I'm confused why there are four patches
shown when applying, versus only one listed under the attachments in the bug.
See [1].

In addition, before the patches are applied the current behaviour in master
doesn't match with what is described in the bug.

For me, the patron successfully switches, but the barcode error is displayed
(tested using koha-testing-docker with the sample data):

1. Enable the AutoSwitchPatron system preference.
2. Go to check out an item to a patron: enter name, such as Mary, in the check
out search box.
3. On the checkout page, enter the card number for another patron instead of an
item barcode, for example: Lisa - 23529000197047.
4. The patron switches to Lisa.
5. Two messages are displayed:

   Patron was automatically switched by reading the patron card during checking
out. Ensure you are working with the right patron.

   Barcode not found
   The barcode was not found: 23529000197047
   Add record using fast cataloging


[1] Result of trying to apply the patch(es):

git bz apply 35518

Bug 35518 - Call to C4::Context->userenv happens before it's gets populated
breaks code logic in circulation

161929 - Bug 35518: Check authentication and set userenv before fetching
userenv variables
161930 - Bug 35518: Tidy the moved blocks
162216 - Bug 35518: follow up - clear the barcode list in  AutoSwitchPatron
block
162218 - Bug 35518: Follow-up for AutoSwitchPatron - clear $patron variable too

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 35518: Check authentication and set userenv before fetching
userenv variables
Using index info to reconstruct a base tree...
M       circ/circulation.pl
Falling back to patching base and 3-way merge...
Auto-merging circ/circulation.pl
CONFLICT (content): Merge conflict in circ/circulation.pl
error: Failed to merge in the changes.
Patch failed at 0001 Bug 35518: Check authentication and set userenv before
fetching userenv variables

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list