[Bug 21250] New: Auto-self-checkout not fully compatible with two-branch library setup
From looking at the code it seems that C4::Circulation->AddIssue() is using "C4::Context->userenv->{branch}" where "$borrower->{'branch'}" should probably be used instead, since the current user's branch isn't relevant (even wrong) in
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21250 Bug ID: 21250 Summary: Auto-self-checkout not fully compatible with two-branch library setup Change sponsored?: --- Product: Koha Version: 18.05 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Self checkout Assignee: koha-bugs@lists.koha-community.org Reporter: oliver.behnke@aei.mpg.de QA Contact: testopia@bugs.koha-community.org We use a two-branch library setup, both with auto-self-checkout enabled, so patrons log in with their cardnumber via the pre-defined staff user account (see below). The problem is that since the internal self-checkout user also has to be assigned to exactly one branch, that branch will be used as "current location" when a patron checks out a book. So, it's the self-service account's branch that's used instead of the patron's/borrower's branch. the auto-self-checkout context. FYI, we use the following config (if relevant at all): - Koha 18.05.01-2 - AutoSelfCheckAllowed: Allow (AutoSelfCheckID/AutoSelfCheckPass) - CircControl: the library the item is from - HomeOrHoldingBranch: the library the item is from Thank you. -- 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=21250 Oliver Behnke <oliver.behnke@aei.mpg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=10060 -- 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=21250 --- Comment #1 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- It's probably a good idea to verify that all uses of "C4::Context->userenv" (anywhere) are compatible with the auto-self-checkout system as the underlying assumption that the current user is always a concrete patron or librarian isn't applicable in that scenario. Cheers -- 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=21250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think using the current user's branch would not be correct - it's possible that patrons from one home library visit other branches for lending books. For another solution see: https://wiki.koha-community.org/wiki/Override_sysprefs_in_Apache_config -- 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=21250 --- Comment #3 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- (In reply to Katrin Fischer from comment #2)
I think using the current user's branch would not be correct - it's possible that patrons from one home library visit other branches for lending books.
I understand your point but what you describe is an edge case, compared to the current implementation which is always wrong for the patrons of all but one branch.
For another solution see: https://wiki.koha-community.org/wiki/Override_sysprefs_in_Apache_config
I fail to see how that can be solution. Our scenario comprises a single library with two branches, which seems to me as a standard well supported setup. Those branches share the same Koha instance and OPAC. There's therefore just a single web server. How am I supposed to modify the request headers for the branch-local self-service terminals when they simply display the same website? Thanks -- 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=21250 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Oliver Behnke from comment #3)
(In reply to Katrin Fischer from comment #2)
I think using the current user's branch would not be correct - it's possible that patrons from one home library visit other branches for lending books.
I understand your point but what you describe is an edge case, compared to the current implementation which is always wrong for the patrons of all but one branch.
Sorry, but I don't think it's an edge case. It's very usual for a lot of the libraries that patrons use more than one branch.
For another solution see: https://wiki.koha-community.org/wiki/Override_sysprefs_in_Apache_config
I fail to see how that can be solution. Our scenario comprises a single library with two branches, which seems to me as a standard well supported setup. Those branches share the same Koha instance and OPAC. There's therefore just a single web server. How am I supposed to modify the request headers for the branch-local self-service terminals when they simply display the same website?
Thanks
You'd change your Apache configuration to keep your normal URL as it is, but have 2 separate URLs for each branch of your library. Say: branch1.library.org and branch2.library.org - using those with the sys pref overwrite at the self check stations would then help select the right patron. But this discussion is getting out of scope here - Apache setup should be better discussed on the mailing list. -- 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=21250 --- Comment #5 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- I didn't mean to ignore your case, I just wanted to point out that the current situation is even worse :-) Thanks again Katrin. As I said in #10060, I'm going to have a closer look at VirtualHost workaround. I don't think this discussion is getting of course since you're providing a workaround for the issue we discuss here. I think that eventually your idea in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10060#c17 should be implemented as a solution to this issue, though. Cheers -- 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=21250 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Yes, the Apache solution is more of a workaround than a nice solution. I like the idea of the parameter, but it probably won't be implemented without someone funding it. -- 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=21250 --- Comment #7 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- Could anyone provide further funding details? Monetary or developer time? Any required effort estimates? IOW, how would "funding" work? I had a brief look at the code some time ago and this particular part seemed rather strewn across various places. I'd give it a shot myself if only I could be sure where to look first of all :-) Cheers -- 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=21250 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Oliver Behnke from comment #7)
Could anyone provide further funding details? Monetary or developer time? Any required effort estimates? IOW, how would "funding" work?
As Koha is open source, you have a lot of different options. You could switch the 'Change sponsored' field here to 'Seeking developer' or 'Seeking cosponsors', but I am not sure how many check that. You could ask for quotes on the mailing list or contact developers directly for quotes. If you want to have a go yourself, you could join us on IRC for help or ask questions on the mailing list. -- 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=21250 --- Comment #9 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- FYI, I successfully deployed the Apache-based syspref override workaround. The nice thing about it is that (with Apache 2.4) you don't even need a separate VirtualHost. Just use conditionals in the existing OPAC VirtualHost: <If "-R 'CLIENT_OR_NET_IP_HERE'"> SetEnv OVERRIDE_SYSPREF_AutoSelfCheckID "abc" SetEnv OVERRIDE_SYSPREF_AutoSelfCheckPass "123" RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckID abc" RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckPass 123" </If> Cheers -- 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=21250 --- Comment #10 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- I should have added that the two bottom statement are for Plack users, so you only need one of the pairs. -- 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=21250 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Oliver, thx for sharing your solution, I've added it to the wiki: https://wiki.koha-community.org/wiki/Override_sysprefs_in_Apache_config#Exam... Can you check? -- 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=21250 --- Comment #12 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- You could add "See also" refs to the Apache docs covering the expression I used: https://httpd.apache.org/docs/2.4/mod/core.html#if https://httpd.apache.org/docs/2.4/expr.html Also, could you please add the following in-line comments about Plack integration, which is, AFAIK, optional. I also changed the user/pw placeholders to match the existing wiki examples. <If "-R 'CLIENT_OR_NET_IP_HERE'"> # Koha without Plack SetEnv OVERRIDE_SYSPREF_AutoSelfCheckID "xyz" SetEnv OVERRIDE_SYSPREF_AutoSelfCheckPass "abc" # Koha with Plack # (commas must be escaped with '\') RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckID xyz" RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckPass abc" </If> HTH -- 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=21250 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|18.05 |master CC| |martin.renvoize@ptfs-europe | |.com -- 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=21250 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Oliver Behnke from comment #12)
You could add "See also" refs to the Apache docs covering the expression I used:
https://httpd.apache.org/docs/2.4/mod/core.html#if https://httpd.apache.org/docs/2.4/expr.html
Also, could you please add the following in-line comments about Plack integration, which is, AFAIK, optional. I also changed the user/pw placeholders to match the existing wiki examples.
<If "-R 'CLIENT_OR_NET_IP_HERE'"> # Koha without Plack SetEnv OVERRIDE_SYSPREF_AutoSelfCheckID "xyz" SetEnv OVERRIDE_SYSPREF_AutoSelfCheckPass "abc"
# Koha with Plack # (commas must be escaped with '\') RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckID xyz" RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_AutoSelfCheckPass abc" </If>
HTH
Hi Oliver, I didn't get to it yet. If you want, please feel free to edit the wikipage yourself! Account creation is moderated, so it might take a little bit to go through, but it's only an anti-spam measure and everyone is invited to contribute. -- 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=21250 --- Comment #14 from Oliver Behnke <oliver.behnke@aei.mpg.de> --- Done. -- 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=21250 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Awesome, thx! -- 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=21250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As we found a workaround, I am lowering severity to 'normal' - might be bordering on enh at this point. -- 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=21250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Auto-self-checkout not |Auto-self-checkout not |fully compatible with |fully compatible with |two-branch library setup |multi-branch library setup -- 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=21250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 24332 has been marked as a duplicate of this bug. *** -- 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=21250 --- Comment #18 from Christopher Brannon <cbrannon@cdalibrary.org> --- Would like to see a more straight forward solution to this. -- 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=21250 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Christopher Brannon from comment #18)
Would like to see a more straight forward solution to this.
Agreed - was just linking both as I think it's the same problem and maybe this is still helpful as a workaround. -- 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=21250 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #20 from David Cook <dcook@prosentient.com.au> --- At the moment, we use a local customization where you use a URL with a branch parameter, and then some local system preferences to use branch-specific users. -- 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=21250 --- Comment #21 from David Cook <dcook@prosentient.com.au> --- Created attachment 189889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189889&action=edit Bug 21250: Allow multi-branch variants of AutoSelfCheckID This change allows multiple AutoSelfCheck users so that different branches can use different users which will apply the correct circulation and fines rules, locations for circs, etc. Test plan: 0. Apply the patch 1. koha-plack --restart kohadev 2. Set up different users that share the same userid as the value in AutoSelfCheckID, but with the target branch code appended to the end of the userid. Ensure that the passwords and permissions are the same for all of these users. 3. Visit a branch specific SCO. For example: /cgi-bin/koha/sco/sco-main.pl?branch=FPL 4. If you have a user like "self_checkoutFPL", then it should auto-login. The session for this user should be preserved for subsequent actions so long as the HTTP cookie is retained -- 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=21250 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- 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=21250 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org