Bug 7673 [Terminology follow-up] New patron permissions to manage items
authorOwen Leonard <oleonard@myacpl.org>
Wed, 29 Oct 2014 15:58:39 +0000 (11:58 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 11 Nov 2014 15:27:28 +0000 (12:27 -0300)
This bug adds a new preference, "SubfieldsToAllowForRestrictedEdition,"
but the use of the term "Edition" in this context is incorrect. I think
it would be more clear to change the preference name to
"SubfieldsToAllowForRestrictedEditing." This patch makes this change.

I realize this isn't a big issue since the preference has a good
description, but I thought that if we were going to make this as clear
as possible now would be the time to do it.

To test, start with a database which hasn't previously been used to test
Bug 7673. Apply all patches and run the database update. Follow the test
plan as described in the bug.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, change appears complete.
All tests and QA script still pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
cataloguing/additem.pl
installer/data/mysql/de-DE/mandatory/userpermissions.sql
installer/data/mysql/en/mandatory/userpermissions.sql
installer/data/mysql/es-ES/mandatory/userpermissions.sql
installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
installer/data/mysql/it-IT/necessari/userpermissions.sql
installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
installer/data/mysql/pl-PL/mandatory/userpermissions.sql
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref

index e6151d3..047b733 100755 (executable)
@@ -158,15 +158,15 @@ sub generate_subfield_form {
         my $attributes_no_value = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" );
         my $attributes_no_value_textarea = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" rows="5" cols="64" );
 
-        # Getting list of subfields to keep when restricted edition is enabled
-        my $subfieldsToAllowForRestrictedEdition = C4::Context->preference('SubfieldsToAllowForRestrictedEdition');
+        # Getting list of subfields to keep when restricted editing is enabled
+        my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing');
         my $allowAllSubfields = (
-            not defined $subfieldsToAllowForRestrictedEdition
-              or $subfieldsToAllowForRestrictedEdition == q||
+            not defined $subfieldsToAllowForRestrictedEditing
+              or $subfieldsToAllowForRestrictedEditing == q||
         ) ? 1 : 0;
-        my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEdition);
+        my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing);
 
-        # If we're on restricted edition, and our field is not in the list of subfields to allow,
+        # If we're on restricted editing, and our field is not in the list of subfields to allow,
         # then it is read-only
         $attributes_no_value .= 'readonly="readonly" '
             if (
@@ -247,7 +247,7 @@ sub generate_subfield_form {
                     -class    => "input_marceditor",
                 );
 
-                # If we're on restricted edition, and our field is not in the list of subfields to allow,
+                # If we're on restricted editing, and our field is not in the list of subfields to allow,
                 # then it is read-only
                 push @scrparam, (-readonly => "readonly"), (-disabled => "disabled")
                     if (
@@ -374,12 +374,12 @@ my ($template, $loggedinuser, $cookie)
                  });
 
 
-# Does the user have a restricted item edition permission?
+# Does the user have a restricted item editing permission?
 my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef;
 my $restrictededition = $uid ? haspermission($uid,  {'editcatalogue' => 'edit_items_restricted'}) : undef;
-# In case user is a superlibrarian, edition is not restricted
+# In case user is a superlibrarian, editing is not restricted
 $restrictededition = 0 if ($restrictededition != 0 &&  C4::Context->IsSuperLibrarian());
-# In case user has fast cataloging permission (and we're in fast cataloging), edition is not restricted
+# In case user has fast cataloging permission (and we're in fast cataloging), editing is not restricted
 $restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && haspermission($uid, {'editcatalogue' => 'fast_cataloging'}));
 
 my $today_iso = C4::Dates->today('iso');
index ce30cdf..a47151f 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'),
    ( 9, 'fast_cataloging', 'Schnellaufnahmen anlegen'),
    ( 9, 'edit_items', 'Exemplare bearbeiten'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Gebühren erlassen'),
    (10, 'remaining_permissions', 'Verbleibende Berechtigungen für die Verwaltung von Gebühren'),
index 8bf71d8..156d919 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
    ( 9, 'fast_cataloging', 'Fast cataloging'),
    ( 9, 'edit_items', 'Edit items'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Write off fines and fees'),
    (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
index 698ccfe..6f6b600 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
    ( 9, 'fast_cataloging', 'Fast cataloging'),
    ( 9, 'edit_items', 'Edit Items'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Write off fines and fees'),
    (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
index 15f446e..6bce622 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'),
    ( 9, 'fast_cataloging', 'Catalogage rapide'),
    ( 9, 'edit_items', 'Modifier des exemplaires'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Write off fines and fees'),
    (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
index 1ab8607..740c2f7 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'),
    ( 9, 'fast_cataloging', 'Catalogazione veloce'),
    ( 9, 'edit_items', 'Crea/modifica copie'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Cancellare multe e tariffe'),
    (10, 'remaining_permissions', 'Permessi rimanenti per gestione multe e costi'),
index 551bb9b..f8789f7 100644 (file)
@@ -31,7 +31,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'),
    ( 9, 'fast_cataloging', 'Hurtigkatalogisering'),
    ( 9, 'edit_items', 'Endre eksmeplarer'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Write off fines and fees'),
    (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
index 32b01bf..9564a6f 100644 (file)
@@ -11,7 +11,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    ( 9, 'edit_catalogue', 'Edit catalogue'),
    ( 9, 'fast_cataloging', 'Szybkie katalogowanie'),
    ( 9, 'edit_items', 'Edit Items'),
-   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)'),
+   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
    ( 9, 'delete_all_items', 'Delete all items at once'),
    (10, 'writeoff', 'Write off fines and fees'),
    (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
index e9bbe9c..0af594b 100644 (file)
@@ -388,7 +388,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'),
 ('StatisticsFields','location|itype|ccode', NULL, 'Define Fields (from the items table) used for statistics members','Free'),
 ('SubfieldsToAllowForRestrictedBatchmod','','Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free');
-('SubfieldsToAllowForRestrictedEdition','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
+('SubfieldsToAllowForRestrictedEditing','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
 ('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
 ('SubscriptionDuplicateDroppedInput','','','List of fields which must not be rewritten when a subscription is duplicated (Separated by pipe |)','Free'),
 ('SubscriptionHistory','simplified','simplified|full','Define the display preference for serials issue history in OPAC','Choice'),
index a721ee4..a0f45a2 100755 (executable)
@@ -9441,7 +9441,7 @@ if ( CheckVersion($DBversion) ) {
 $DBversion = "3.17.00.XXX";
 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do(q{
-        INSERT INTO permissions (module_bit, code, description) VALUES ('9', 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEdition preference (please note that edit_item is still required)');
+        INSERT INTO permissions (module_bit, code, description) VALUES ('9', 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)');
     });
 
     $dbh->do(q{
@@ -9459,14 +9459,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
 
     # Add 2 new prefs
     $dbh->do(q{
-        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToAllowForRestrictedEdition','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j','','Free');
+        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToAllowForRestrictedEditing','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j','','Free');
     });
 
     $dbh->do(q{
         INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToAllowForRestrictedBatchmod','','Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j','','Free');
     });
 
-    print "Upgrade to $DBversion done (Bug 7673: Adds 2 new prefs (SubfieldsToAllowForRestrictedEdition and SubfieldsToAllowForRestrictedBatchmod) and 3 new permissions (edit_items_restricted and delete_all_items and items_batchmod_restricted))\n";
+    print "Upgrade to $DBversion done (Bug 7673: Adds 2 new prefs (SubfieldsToAllowForRestrictedEditing and SubfieldsToAllowForRestrictedBatchmod) and 3 new permissions (edit_items_restricted and delete_all_items and items_batchmod_restricted))\n";
     SetVersion($DBversion);
 }
 
index a132731..157bfc8 100644 (file)
@@ -110,15 +110,15 @@ Cataloging:
               class: short
             - as default language in the UNIMARC field 100 when creating a new record or in the field plugin.
         -
-            - Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces.
-            - pref: SubfieldsToAllowForRestrictedEdition
+            - Define a list of subfields for which editing is authorized when edit_items_restricted permission is enabled, separated by spaces.
+            - pref: SubfieldsToAllowForRestrictedEditing
             - 'Examples:'
             - 'UNIMARC: "995$f 995$h 995$j"'
             - 'MARC21: "952$a 952$b 952$c"'
             - Note that the FA framework is excluded from the permission.
             - If the pref is empty, no fields are restricted.
         -
-            - Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces.
+            - Define a list of subfields for which editing is authorized when items_batchmod_restricted permission is enabled, separated by spaces.
             - pref: SubfieldsToAllowForRestrictedBatchmod
             - 'Examples:'
             - 'UNIMARC: "995$f 995$h 995$j"'