Bug 24806 - Syspref ILLOpacbackends can not be disabled
Summary: Syspref ILLOpacbackends can not be disabled
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P3 enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
: 22305 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-05 08:30 UTC by Hans Pålsson
Modified: 2023-11-30 09:54 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Pålsson 2020-03-05 08:30:27 UTC
The syspref ILLOpacbackends allows admin to choose which ILL-backends that should be available to the user in the OPAC. However, there is no way of _not_ having any backends, even the syspref is described as "If left empty, all installed backends will be enabled".

A syspref should not behave like this, if the field is left empty no backends should be available in the OPAC (?).
An alternative solution is to set another syspref that enables/disables use of ILL in OPAC. Libraries that do not allow ordering of ILL from the OPAC must be able to hide this feature.
Comment 1 Magnus Enger 2020-03-05 08:34:38 UTC
> An alternative solution is to set another syspref that enables/disables use of > ILL in OPAC.

This sounds like the cleanest way to do it to me. Then you could hide all traces of ILL in the OPAC.
Comment 2 Hans Pålsson 2020-03-05 09:14:59 UTC
Just to make clear, this is to not allow patrons to make ILL requests from the OPAC. Patrons should still be able to see their ILL-loans "as usual" when logged in the OPAC.
Comment 3 Katrin Fischer 2020-03-05 10:01:40 UTC
I think it would be nice if we had both options - totally disable and only disable adding new.

Maybe a multi-select pref or one with 3 possible values in the drop down?
Comment 4 Hans Pålsson 2020-03-06 11:42:31 UTC
(In reply to Katrin Fischer from comment #3)
> I think it would be nice if we had both options - totally disable and only
> disable adding new.
> 
> Maybe a multi-select pref or one with 3 possible values in the drop down?

Any solution will do, but right now the syspref forces libraries into an unwanted function. An empty field should equal no possibilty for a patron to submit an ILL-request through the OPAC. But that's not really how it works (i think) so a syspref as "Allow OPAC ILL-request submission" is needed.
Comment 5 Magnus Enger 2020-03-30 11:59:52 UTC
Some libraries might also want only some patron categories to have access to creating new ILL requests from the OPAC. But that might be something for another bug report...
Comment 6 Katrin Fischer 2020-05-24 00:27:46 UTC
*** Bug 22305 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2020-05-24 00:28:31 UTC
It looks like I pointed this out on bug 20639 when the pref was introduced:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20639#c14

And as a result bug 22305 was filed for this as another future enhancement.

I will mark the older bug as as duplicate in this case, as I think this bug has more lively discussion/more content.
Comment 8 Katrin Fischer 2020-05-24 00:30:40 UTC
I think the current behaviour of the pref is probably to be explained by the fact that there was supposed to be no behavior change for existing installations when the pref was added and it's hard to detect the installed backends to make a multi-select/add the correct ones in an update?
Comment 9 Katrin Fischer 2020-05-25 06:13:40 UTC
I am sorry, but as the pref works as intended and described, this is not a major bug - it's more an enhancement request right now - the feature you want where the backends can only be enabled for the staff side doesn't exist right now. That doesn't mean I don't understand the need.
Comment 10 Magnus Enger 2022-05-18 06:30:39 UTC
Still a problem.
Comment 11 Hans Pålsson 2022-11-07 10:53:58 UTC
Still a problem (22.05.05).
Comment 12 Pedro Amorim 2023-03-29 15:33:37 UTC
Can we invert this sys pref?
Change old ILLOpacbackends to new HideILLOpacbackends

HideILLOpacbackends:
if empty: does/hides nothing
if one/multiple backend: lists all backends except the one(s) listed
if all backends: hide all backends

For an upgrade script:
Retrieve all currently installed backends (not sure how exactly) and retrieve old ILLOpacbackends value, then:
From the retrieved installed backends, get all that are not part of old ILLOpacbackends and set that to the new HideILLOpacbackends

Does the above respond to every use case for this?
Comment 13 Hans Pålsson 2023-03-30 09:22:38 UTC
It would work for the issue, however the functionality still bothers me. But any solution is good. It is a bit of a backwards suggestion, it would be more logical to say what backends should be visible, since all are addons to Koha (mainly plugins).
Comment 14 Pedro Amorim 2023-04-01 15:41:55 UTC
(In reply to Hans Pålsson from comment #13)
> it would be
> more logical to say what backends should be visible, since all are addons to
> Koha (mainly plugins).

Hi Hans!
The workflow I'm proposing is: as soon as you install a backend, it's enabled and showing by default for both Staff and OPAC, as I believe this is likely the intent (and expectation) of most ILL backend installations (I may be wrong here, of course!).

This change in the sys pref would provide the option of hiding in the OPAC any one, or more - or all - installed backends, an improvement over the current functionality that does not allow for hiding all the backends in the OPAC.

Apologies if not clear enough! Any input or alternative suggestion is welcome.
Comment 15 Hans Pålsson 2023-04-11 13:41:21 UTC
Hi! The suggestion is ok. The important thing is the possibility to hide/disable OPAC integration without "hacking" CSS or similar, as we do today.
Comment 16 Katrin Fischer 2023-04-16 10:21:15 UTC
(In reply to Pedro Amorim from comment #14)
> (In reply to Hans Pålsson from comment #13)
> > it would be
> > more logical to say what backends should be visible, since all are addons to
> > Koha (mainly plugins).
> 
> Hi Hans!
> The workflow I'm proposing is: as soon as you install a backend, it's
> enabled and showing by default for both Staff and OPAC, as I believe this is
> likely the intent (and expectation) of most ILL backend installations (I may
> be wrong here, of course!).
> 
> This change in the sys pref would provide the option of hiding in the OPAC
> any one, or more - or all - installed backends, an improvement over the
> current functionality that does not allow for hiding all the backends in the
> OPAC.
> 
> Apologies if not clear enough! Any input or alternative suggestion is
> welcome.

I believe it was done the currnet way for technical reasons. I am not sure if it's possible to detect all installed backends (probably that is possible), but it might be harder to trigger an update to pref at the time a backend is installed, without each backend implementing the update itself. I guess when this was added the intent was not to be disruptive/change current behaviour and not to enforce backend providers to change. 

Ideally we should display a list of installed backends in a list, so people just need to check/uncheck.

Maybe an "all" or "always hide" option could work?
Comment 17 Lisette Scheer 2023-11-29 19:23:47 UTC
If Bug 19605 makes backends pluggable would it be easier to generate a list of options?
Comment 18 Pedro Amorim 2023-11-30 09:35:45 UTC
(In reply to Lisette Scheer from comment #17)
> If Bug 19605 makes backends pluggable would it be easier to generate a list
> of options?

Bug 19605 is updating the available_backends sub in Illrequest/Config.pm - among other things. That sub is designed to be the single source of truth for installed backends in a system, and that should be the case before and after bug 19605.

(In reply to Katrin Fischer from comment #16)
> Ideally we should display a list of installed backends in a list, so people
> just need to check/uncheck.

This would be ideal, I agree. Although looking at the code it seems it would be possible to have this working without each backend having to implement the update itself (which would be preferable I think).

(In reply to Hans Pålsson from comment #0)
> A syspref should not behave like this, if the field is left empty no
> backends should be available in the OPAC (?).
> An alternative solution is to set another syspref that enables/disables use
> of ILL in OPAC. Libraries that do not allow ordering of ILL from the OPAC
> must be able to hide this feature.

See bug 18203 (pushed to master). It's not the same as the ILLOpacbackends sys pref, but I believe it should help in satisfying the following requirement:
"Libraries that do not allow ordering of ILL from the OPAC must be able to hide this feature."
At least on a per borrower category basis.
Comment 19 Hans Pålsson 2023-11-30 09:54:50 UTC
(In reply to Pedro Amorim from comment #18)
> See bug 18203 (pushed to master). It's not the same as the ILLOpacbackends
> sys pref, but I believe it should help in satisfying the following
> requirement:
> "Libraries that do not allow ordering of ILL from the OPAC must be able to
> hide this feature."
> At least on a per borrower category basis.

I will have to test it, but I belive you are right. Thanks for the help, it should solve the problem.