Bug 12636: Do not display unique patron attributes in the batch patron modification
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 21 Dec 2015 12:31:59 +0000 (12:31 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 20:52:36 +0000 (20:52 +0000)
Batch patron modification should not offer to update patron attributes
with values which are designated as unique since such attributes are
required to be unique to a single patron.

Test plan:
Create some patron attributes, some should be unique.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as unique won't be
display anymore.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
tools/modborrowers.pl

index 95d26de..9937993 100755 (executable)
@@ -110,6 +110,7 @@ if ( $op eq 'show' ) {
         # TODO Repeatable attributes are not correctly managed and can cause data lost.
         # This should be implemented.
         next if $attr_type->{repeatable};
+        next if $attr_type->{unique_id}; # Don't display patron attributes that must be unqiue
         my $options = $attr_type->authorised_value_category
             ? GetAuthorisedValues( $attr_type->authorised_value_category )
             : undef;