Koha-clms/Koha/Exceptions
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
..
Acquisition Bug 26582: Add Koha::Acquisition::Basket->close 2020-11-05 15:24:20 +01:00
Checkouts Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Patron Bug 8326: Make repeatable and unique_id modifiable when editing patron attribute type 2021-02-15 11:48:55 +01:00
Account.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Authentication.pm Bug 18137: Add useful Koha::Exceptions 2017-09-21 11:27:04 -03:00
Authorization.pm Bug 18137: Add useful Koha::Exceptions 2017-09-21 11:27:04 -03:00
ClubHold.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
Config.pm Bug 19542: Add a check for ES configuration health 2017-12-11 14:30:42 -03:00
Elasticsearch.pm Bug 19893: Add code review fixes 2018-11-16 11:04:59 +00:00
Exception.pm Bug 21022: (follow-up) Move overloaded full_message method to subclass 2018-07-13 13:25:15 +00:00
Hold.pm Bug 27209: Add Koha::Hold->set_pickup_location 2020-12-21 10:07:45 +01:00
Ill.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Library.pm Bug 18072: Add Koha::Item->can_be_transferred 2018-07-18 17:29:04 +00:00
Metadata.pm Bug 26171: (QA follow-up) Add table name and object type to message 2021-01-04 13:29:50 +01:00
Object.pm Bug 25423: Add Koha::Exceptions::Object::NotInstantiated 2020-05-08 15:42:37 +02:00
Password.pm Bug 23816: (follow-up) Fix many things 2020-09-09 15:39:52 +02:00
Patron.pm Bug 14708: (QA follow-up) Throw exception when deleting anonymous borrower 2020-11-06 09:40:25 +01:00
Plugin.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Token.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00