Bug 19822 - Add system preferences for ILL Module
Summary: Add system preferences for ILL Module
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P1 - high enhancement with 2 votes (vote)
Assignee: Pedro Amorim
QA Contact:
URL:
Keywords:
Depends on: 21548 32546
Blocks: 32899
  Show dependency treegraph
 
Reported: 2017-12-15 14:49 UTC by Caroline Cyr La Rose
Modified: 2024-01-08 14:51 UTC (History)
10 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 Caroline Cyr La Rose 2017-12-15 14:49:22 UTC
Right now, the ILL module is only configurable through the .conf file on the server. It would be great if we could add system preferences so that the configuration can be done through Koha's staff interface.

- Tab in system preferences for all ILL configurations
- Make StaffRequestComments (hide/show) a sys pref
- Make ReplyDate (hide/show) a sys pref
- Make DigitalRecipient (borrower/branch) a sys pref
- Make PartnerCode (text entry, with by default ILLLIBS entered) a sys pref
Comment 1 Martin Renvoize 2018-04-23 16:08:13 UTC
I'm wondering if this should be a distinct area under tools rather than exposed in the preferences page. That would more easily allow for different backends to expose their own individual configuration parameters more easily than each one having to attempt to somehow add to the preferences framework.
Comment 2 Katrin Fischer 2018-04-24 06:10:49 UTC
I think the plugins can have their own configuration pages as well. Maybe system preferences for the global values?
Comment 3 Magnus Enger 2018-11-06 11:00:41 UTC
(In reply to Martin Renvoize from comment #1)
> I'm wondering if this should be a distinct area under tools rather than
> exposed in the preferences page. That would more easily allow for different
> backends to expose their own individual configuration parameters more easily
> than each one having to attempt to somehow add to the preferences framework.

If ILL backends are turned into KPZ style plugins, this should solve itself.
Comment 4 Andrew Isherwood 2018-11-06 11:08:52 UTC
(In reply to Magnus Enger from comment #3)
> If ILL backends are turned into KPZ style plugins, this should solve itself.

Not entirely sadly. A number of the config elements apply to ILL as a whole, rather than being backend specific. Certainly the config elements that are backend specific would be moved to plugin config, but I think the ones that applied to ILL as a whole would still need moving to sysprefs.
Comment 5 Magnus Enger 2018-11-06 12:14:01 UTC
(In reply to Andrew Isherwood from comment #4)
> Not entirely sadly. A number of the config elements apply to ILL as a whole,
> rather than being backend specific. Certainly the config elements that are
> backend specific would be moved to plugin config, but I think the ones that
> applied to ILL as a whole would still need moving to sysprefs.

Sorry for being unclear, I mean the same as you. General setting as sysprefs, backend-specific ones handled by the KPZ plugin system.
Comment 6 Katrin Fischer 2023-01-13 09:45:47 UTC
Can we identify the global settings from the conf-settings?

My impression is that not even the mandatory ones are used by the backend, even tho they are required to allow access to the module:

https://wiki.koha-community.org/wiki/ILL_backends

 1  <interlibrary_loans>
 2      <!-- Path to where Illbackends are located on the system
 3           - This setting should normally not be touched -->
 4      <backend_directory>__PERL_MODULE_DIR__/Koha/Illbackends</backend_directory>
 5      <!-- How should we treat staff comments?
 6           - hide: don't show in OPAC
 7           - show: show in OPAC -->
 8      <staff_request_comments>hide</staff_request_comments>
 9      <!-- How should we treat the reply_date field?
10           - hide: don't show this field in the UI
11           - any other string: show, with this label -->
12      <reply_date>hide</reply_date>
13      <!-- Where should digital ILLs be sent?
14           - borrower: send it straight to the borrower email
15           - branch: send the ILL to the branch email -->
16      <digital_recipient>branch</digital_recipient>
17      <!-- What patron category should we use for p2p ILL requests?
18           - By default this is set to 'ILLLIBS' -->
19      <partner_code>ILLLIBS</partner_code>
20      <branch><code>code_for_your_branch</code></branch>
21  </interlibrary_loans>

backend_directory: If we moved to plugins, this would probably be replaced by the plugin path. How will Koha recognize that it's an ILL type plugin?

staff_request_comments: Could be a system preference

reply_date: Could be a system preference

digital_recipient: Could be a system preference, not sure how this is implemented in the ILL module

partner_code: Could be moved to plugins but also be a system preference. It should be updated to be set to IL on ktd/dev environments to match sample data.

branch: I am not sure how and if this is used at all, need to verify.
Comment 7 Pedro Amorim 2023-01-16 17:08:26 UTC
Katrin, please note the below comments and let me know if you agree.

Should be a sys pref:

partner_code:
- Only used by generic_confirm in Koha/Illrequest.pm;
- Requires backend to have GENREQ request status to have "Place request with partners" button available and show the UI screen that uses partner_code;
- Requires patron of <partner_code> category to have a primary email else it's not listed in the partners list;
- Sys pref would maintain current default ILLLIBS value;
- @Katrin should we have a separate bug to update sample_patron.yml and patron_categories.yml in the sample data's patron category from IL to ILLLIBS?

staff_request_comments and reply_date:
- Are both 'censorship' flags handled in load_configuration in Illrequest/Config.pm
- Unfortunately these are strings and code is checking if they match 'hide'. Converting these into sys pref, they should be renamed to hide_staff_request_comments and hide_reply_date and be boolean.

digital_recipient:
- Either 'borrower' or 'branch'. Illrequest/Config.pm has a getter for this but it's only used by backends as far as I can tell.
- As a sys pref, would be a dropdown with both values.


Should stay in config:

backend_directory;

branch:
- A check is made for if <branch> element exists in koha-conf.xml;
- The <branch> block is repeatable.

branch/code and branch/prefix:
- I believe these are only to be used in tandem with each other, to possibilitate different request ID prefixes for different branches;
Comment 8 Katrin Fischer 2023-01-16 17:47:10 UTC
(In reply to Pedro Amorim from comment #7)
> Katrin, please note the below comments and let me know if you agree.
> 
> Should be a sys pref:
> 
> partner_code:
> - Only used by generic_confirm in Koha/Illrequest.pm;
> - Requires backend to have GENREQ request status to have "Place request with
> partners" button available and show the UI screen that uses partner_code;
> - Requires patron of <partner_code> category to have a primary email else
> it's not listed in the partners list;
> - Sys pref would maintain current default ILLLIBS value;
> - @Katrin should we have a separate bug to update sample_patron.yml and
> patron_categories.yml in the sample data's patron category from IL to
> ILLLIBS?

There already is a separate one: bug 21548, but I'd actually standardize by changing ILLLIBS to IL. The sample data has been used like this forever, the ILL never matching was an early oversight in my opinion. 

I wonder how we could add a good general description to the system preference - might have to include some technical information too. Or we'd just make it the common spot to define your ILL patron category.

> staff_request_comments and reply_date:
> - Are both 'censorship' flags handled in load_configuration in
> Illrequest/Config.pm
> - Unfortunately these are strings and code is checking if they match 'hide'.
> Converting these into sys pref, they should be renamed to
> hide_staff_request_comments and hide_reply_date and be boolean.

+1

I'd have said 'display' maybe?

> digital_recipient:
> - Either 'borrower' or 'branch'. Illrequest/Config.pm has a getter for this
> but it's only used by backends as far as I can tell.
> - As a sys pref, would be a dropdown with both values.
> 
> 
> Should stay in config:
> 
> backend_directory;
> 
> branch:
> - A check is made for if <branch> element exists in koha-conf.xml;
> - The <branch> block is repeatable.

How and what is this used for? I think 'our' backend doesn't use it at all. Does it need to remain mandatory? I think having to add a valid branchcode complicates standardized setups unnecessarily.

> branch/code and branch/prefix:
> - I believe these are only to be used in tandem with each other, to
> possibilitate different request ID prefixes for different branches;

Just a thought: maybe we could move to a YAML style pref?
Comment 9 Katrin Fischer 2023-01-20 14:16:39 UTC
Hi Pedro,
I just wrote a patch to move the ILL preferences to their own tab in administration. It could be nice preparation for this bug, where we want to add more preferences: bug 32546
Comment 10 Pedro Amorim 2023-02-07 11:56:19 UTC
Adding 21548 as a dependency as partner_code in koha-conf.xml is ILLLIBS but sample data is using IL. This would cause a future test plan to be more work than it has to be.
Comment 11 Katrin Fischer 2023-10-01 15:16:16 UTC
Now that the depending bugs are done - could we resume here? :)