Koha-clms/Koha/Patron
Jonathan Druart a066f03b5e Bug 8326: Make repeatable and unique_id modifiable when editing patron attribute type
This patch add the ability to modify the attribute "repeatable" and
"unique_id" for a patron's attribute type.
Prior to this patch it was not possible, to keep data integrity.

When editing an attr type, the controller will check is the value can be
modified, depending on the existing patron's attributes.

Test plan:
0/ Setup
Create 1 patron attribute PA1 that can be repeatable
Create 1 patron attribute PA2 that does not have the unique restriction
Create 1 patron attribute PA3 that cannot be repeatable and does not
have the unique restriction

1/
Edit them and confirm that you can modify the repeatable and unique
restrictions

2/ Restore values from 0.
Create a patron P1 with several PA1, PA2=42 and whatever in PA3

3/ Edit PA1 => you cannot remove the repeatable flag but can still
remove the unique

4/ Create a patron P2 with PA2=42

5/ Edit PA2 => you cannot add the unique flag

Play a bit more with the different combinaisons and confirm that it
works as advertised.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:55 +01:00
..
Attribute Bug 8326: Make repeatable and unique_id modifiable when editing patron attribute type 2021-02-15 11:48:55 +01:00
Password Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Attribute.pm Bug 20443: Do not explode if attribute does not have a valid av 2020-03-23 13:49:23 +00:00
Attributes.pm Bug 20443: Fix merge_with behavior 2020-03-23 13:49:24 +00:00
Categories.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Category.pm Bug 23816: trivial code simplification 2020-09-09 15:39:52 +02:00
Consent.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Consents.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Debarments.pm Bug 26594: (QA follow-up) Make _UpdateBorrowerDebarmentFlags a public method 2020-11-10 15:00:14 +01:00
Discharge.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Files.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
HouseboundProfile.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundProfiles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundRole.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundRoles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundVisit.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundVisits.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Image.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Images.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Message.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Messages.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Modification.pm Bug 20443: Fix patron modification approval 2020-03-23 13:49:23 +00:00
Modifications.pm Bug 20443: Fix patron modification approval 2020-03-23 13:49:23 +00:00
Relationship.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Relationships.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00