[Bug 41259] New: The system preference ILLOpacbackends does not work
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41259 Bug ID: 41259 Summary: The system preference ILLOpacbackends does not work Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: andreas.jonsson@kreablo.se QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com The subroutine opac_available_backends does not work as expected. Expected behavior: - If user is logged, return list of backends that are 1) installed and 2) listed in ILLOpacbackends Actual behavior: - If user is logged in, - If ILLOpacbackends is empty, returns all backends - If ILLOpacbackends contains several values, return no backend As the Standard backend is always available, it will be enabled by default in OPAC, and needs to be disabled by setting ILLOpacbackends to something that isn't a substring of "Standard". -- 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=41259 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24806 -- 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=41259 --- Comment #1 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Hi Andreas, I believe the behavior you describe is the functionality working as designed. (In reply to Andreas Jonsson from comment #0)
Expected behavior:
- If user is logged, return list of backends that are 1) installed and 2) listed in ILLOpacbackends
This would imply having to update the sys pref everytime a backend is installed/uninstalled. I believe the way it's designed (e.g. show all if left empty) is to ensure that Koha systems not using this sys pref get all backends by default, which is what one would expect i.e. 1) install a backend 2) see it as an available option.
Actual behavior:
- If user is logged in, - If ILLOpacbackends is empty, returns all backends
Correct, as is noted on the sys pref description: "If left empty, all installed backends will be enabled.".
- If ILLOpacbackends contains several values, return no backend
What do you mean by 'several values' here? The syspref expects backend names separated by '|'. If the value of this sys pref does not match any backend name, none are returned. If, however, we have say Standard, BackendA and BackendB installed, we can set the sys pref as 'Standard|BackendA' and BackendB won't show as an OPAC option.
As the Standard backend is always available, it will be enabled by default in OPAC, and needs to be disabled by setting ILLOpacbackends to something that isn't a substring of "Standard".
In this instance, if you have say Standard and Libris backends installed, and don't want to provide Standard as an option, then having ILLOpacbackends = 'Libris' would only show Libris as the OPAC backend. If, however, your requirement is to have the ILLModule only on the Staff client, and not have it on the OPAC at all, I think that's a different discussion/enhancement. This syspref in particular has quite a bit of test coverage: prove ./t/db_dependent/Koha/ILL/Request/Config.t Please let me know if the above helps or if I misunderstood the issue. -- 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=41259 --- Comment #2 from Andreas Jonsson <andreas.jonsson@kreablo.se> --- (In reply to Pedro Amorim from comment #1)
Hi Andreas, I believe the behavior you describe is the functionality working as designed.
(In reply to Andreas Jonsson from comment #0)
Expected behavior:
- If user is logged, return list of backends that are 1) installed and 2) listed in ILLOpacbackends
This would imply having to update the sys pref everytime a backend is installed/uninstalled. I believe the way it's designed (e.g. show all if left empty) is to ensure that Koha systems not using this sys pref get all backends by default, which is what one would expect i.e. 1) install a backend 2) see it as an available option.
Actual behavior:
- If user is logged in, - If ILLOpacbackends is empty, returns all backends
Correct, as is noted on the sys pref description: "If left empty, all installed backends will be enabled.".
- If ILLOpacbackends contains several values, return no backend
What do you mean by 'several values' here? The syspref expects backend names separated by '|'. If the value of this sys pref does not match any backend name, none are returned. If, however, we have say Standard, BackendA and BackendB installed, we can set the sys pref as 'Standard|BackendA' and BackendB won't show as an OPAC option.
As the Standard backend is always available, it will be enabled by default in OPAC, and needs to be disabled by setting ILLOpacbackends to something that isn't a substring of "Standard".
In this instance, if you have say Standard and Libris backends installed, and don't want to provide Standard as an option, then having ILLOpacbackends = 'Libris' would only show Libris as the OPAC backend.
If, however, your requirement is to have the ILLModule only on the Staff client, and not have it on the OPAC at all, I think that's a different discussion/enhancement.
This syspref in particular has quite a bit of test coverage: prove ./t/db_dependent/Koha/ILL/Request/Config.t
Please let me know if the above helps or if I misunderstood the issue.
I believe that making an ILL-backend available from the OPAC is a decision that libraries might want to make explicitly. So even if it is document that empty means "all" it is not necessarily what is expected. Particularly, since the Standard backend is now bundled by default it came as a surprise that it was available from the OPAC per default. I was reacting to the fact that the system preference is treated as one value, not a list. But since it is actually used as a regexp separating values with | would kind of work, although surely there are other unexpected consequences of this implementation, not least the usual security concerns of using user input as Perl regexps. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org