Bug 15163: Do not erase patron attributes if limited to another library
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 22 Feb 2016 10:08:55 +0000 (10:08 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Mon, 21 Mar 2016 16:56:37 +0000 (16:56 +0000)
commit4a3404594ff326e0babb8b7bee8e65f5646ff9f9
tree594f6bb95331b14aa23a6b9091a4098362063e4e
parent8d64bb9eb0555983936077b5fab4ca1a648b6871
Bug 15163: Do not erase patron attributes if limited to another library

The patron attributes displayed on editing a patron are not displayed if
limited to another library.

C4::Members::Attributes::SetBorrowerAttributes will now only delete attributes
the librarian is editing.
SetBorrowerAttributes takes a new $no_branch_limit parameter. If set,
the branch limitations have not effect and all attributes are deleted
(same behavior as before this patch).

Test plan:
1/ Create 2 patron attributes, without branch limitations.
2/ Edit a patron and set a value for these attributes
3/ Limit a patron attributes to a library (one you are not logged in
with).
4/ Edit again the patron.
=> You should not see the limited attributes
5/ Edit the patron attributes and remove the branch limitation
=> Without this patch, it has been removed from the database and is not
displayed anymore.
=> With this patch, you should see it.

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
C4/Auth_with_ldap.pm
C4/Members/Attributes.pm
members/nl-search.pl
t/db_dependent/Members_Attributes.t
tools/import_borrowers.pl