Bug 21548: ILLLIBS patron category / partner_code seems extraneous
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 7 Feb 2023 14:48:02 +0000 (14:48 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 31 Mar 2023 10:14:51 +0000 (12:14 +0200)
This patch updates the default partner category used by the partner_code config to be in line with sample data in sample_patrons.yml

Preparation:
Apply patch
Enable ILLModule sys pref
Install an ILL backend (e.g. FreeForm)
Add this change to your koha-conf.xml
Flush, restart.
Search for patron of category inter-library loan and assign a primary e-mail address to it

Test plan:
Create an ILL request and click 'place request with partners'
Verify that the 'select partner libraries' has the correct patron of IL category

Run tests and ensure they pass:
prove t/db_dependent/Illrequest/Config.t
prove t/Koha/Config.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Illrequest/Config.pm
debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
t/Koha/Config.t
t/data/koha-conf.xml
t/db_dependent/Illrequest/Config.t

index 82b7768..02dac2c 100644 (file)
@@ -255,7 +255,7 @@ sub _load_configuration {
         limits             => {},
         digital_recipients => {},
         prefixes           => {},
-        partner_code       => 'ILLLIBS',
+        partner_code       => 'IL',
         raw_config         => $xml_config,
     };
 
@@ -319,7 +319,7 @@ sub _load_configuration {
         if ( $reply_date && 'hide' eq $reply_date );
 
     # ILL Partners
-    $configuration->{partner_code} = $xml_config->{partner_code} || 'ILLLIBS';
+    $configuration->{partner_code} = $xml_config->{partner_code} || 'IL';
 
     return $configuration;
 }
index 187150f..9feb9bf 100644 (file)
@@ -390,8 +390,8 @@ __END_SRU_PUBLICSERVER__
           - branch: send the ILL to the branch email -->
      <digital_recipient>branch</digital_recipient>
      <!-- What patron category should we use for p2p ILL requests?
-          - By default this is set to 'ILLLIBS' -->
-     <partner_code>ILLLIBS</partner_code>
+          - By default this is set to 'IL' -->
+     <partner_code>IL</partner_code>
  </interlibrary_loans>
 
  <!-- The timezone setting can let you force the timezone for this
index beb5ccd..733fc85 100644 (file)
           - branch: send the ILL to the branch email -->
      <digital_recipient>branch</digital_recipient>
      <!-- What patron category should we use for p2p ILL requests?
-          - By default this is set to 'ILLLIBS' -->
-     <partner_code>ILLLIBS</partner_code>
+          - By default this is set to 'IL' -->
+     <partner_code>IL</partner_code>
  </interlibrary_loans>
 
  <!-- The timezone setting can let you force the timezone for this
index 7799f7c..f6bff14 100644 (file)
                                             <tr>
                                                 <th scope="row"><strong>Warning</strong> </th>
                                                 <td>
-                                                    The ILL module is enabled, but no 'partner_code' defined in koha-conf.xml. Falling back to the hardcoded 'ILLLIBS'.
+                                                    The ILL module is enabled, but no 'partner_code' defined in koha-conf.xml. Falling back to the hardcoded 'IL'.
                                                 </td>
                                             </tr>
                                         [% END %]
index 5f4cff6..23c6c33 100644 (file)
                     [% ELSE %]
                         <fieldset class="rows">
                             <legend>Interlibrary loan request details</legend>
-                            <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
+                            <p>No partners have been defined yet. Please create appropriate patron records (by default IL category).</p>
                             <p>Be sure to provide email addresses for these patrons.</p>
                             <p><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p>
                         </fieldset>
index dbee152..b49579c 100755 (executable)
@@ -214,7 +214,7 @@ subtest 'read_from_file() tests' => sub {
                 'staff_request_comments' => 'hide',
                 'reply_date' => 'hide',
                 'digital_recipient' => 'branch',
-                'partner_code' => 'ILLLIBS',
+                'partner_code' => 'IL',
             },
             'timezone' => '',
             'bcrypt_settings' => '__BCRYPT_SETTINGS__',
index 5a5d5c3..0105292 100644 (file)
           - branch: send the ILL to the branch email -->
      <digital_recipient>branch</digital_recipient>
      <!-- What patron category should we use for p2p ILL requests?
-          - By default this is set to 'ILLLIBS' -->
-     <partner_code>ILLLIBS</partner_code>
+          - By default this is set to 'IL' -->
+     <partner_code>IL</partner_code>
  </interlibrary_loans>
 
  <!-- The timezone setting can let you force the timezone for this
index b80babd..8baa624 100755 (executable)
@@ -60,9 +60,9 @@ subtest 'Basics' => sub {
     is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent.");
 
     # partner_code:
-    is($config->partner_code, "ILLLIBS", "partner_code: Undefined partner_code is undefined.");
-    is($config->partner_code("ILLLIBSTST"), "ILLLIBSTST", "partner_code: setter works.");
-    is($config->partner_code, "ILLLIBSTST", "partner_code: setter is persistent.");
+    is($config->partner_code, "IL", "partner_code: Undefined partner_code is undefined.");
+    is($config->partner_code("ILTST"), "ILTST", "partner_code: setter works.");
+    is($config->partner_code, "ILTST", "partner_code: setter is persistent.");
 
     # limits:
     is_deeply($config->limits, {}, "limits: Undefined limits is empty hash.");
@@ -211,7 +211,7 @@ subtest '_load_configuration' => sub {
             limits             => {},
             digital_recipients => {},
             prefixes           => {},
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => {},
         },
         "load_configuration: return the base configuration."
@@ -229,7 +229,7 @@ subtest '_load_configuration' => sub {
             limits             => {},
             digital_recipients => {},
             prefixes           => {},
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => { backend_directory => '/tmp/' },
         },
         "load_configuration: return the correct backend_dir."
@@ -255,7 +255,7 @@ subtest '_load_configuration' => sub {
             limits             => { branch => { 1 => { method => 'annual', count => 1 } } },
             digital_recipients => { branch => { 3 => 'branch' } },
             prefixes           => { branch => { 2 => '2-prefix' } },
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: multi branch config parsed correctly."
@@ -281,7 +281,7 @@ subtest '_load_configuration' => sub {
             limits             => { branch => { 1 => { method => 'annual', count => 1 } } },
             digital_recipients => { branch => { 1 => 'branch' } },
             prefixes           => { branch => { 1 => '2-prefix' } },
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: single branch config parsed correctly."
@@ -307,7 +307,7 @@ subtest '_load_configuration' => sub {
             limits             => { brw_cat => { A => { method => 'annual', count => 1 } } },
             digital_recipients => { brw_cat => { C => 'branch' } },
             prefixes           => { brw_cat => { B => '2-prefix' } },
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: multi borrower_category config parsed correctly."
@@ -333,7 +333,7 @@ subtest '_load_configuration' => sub {
             limits             => { brw_cat => { 1 => { method => 'annual', count => 1 } } },
             digital_recipients => { brw_cat => { 1 => 'branch' } },
             prefixes           => { brw_cat => { 1 => '2-prefix' } },
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: single borrower_category config parsed correctly."
@@ -357,7 +357,7 @@ subtest '_load_configuration' => sub {
             limits             => { default => { method => 'annual', count => 1 } },
             digital_recipients => { default => 'branch' },
             prefixes           => { default => '2-prefix' },
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: parse the default configuration."
@@ -380,7 +380,7 @@ subtest '_load_configuration' => sub {
             limits             => {},
             digital_recipients => {},
             prefixes           => {},
-            partner_code       => 'ILLLIBS',
+            partner_code       => 'IL',
             raw_config         => $xml_config,
         },
         "load_configuration: parse censorship settings configuration."