Bug 23681 - Make patron restrictions user definable
Summary: Make patron restrictions user definable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Martin Renvoize
QA Contact: Katrin Fischer
URL:
Keywords:
: 6775 (view as bug list)
Depends on: 31129 31136
Blocks: 31097 31573 31095 32215 32787 33549 33550 33551 33578
  Show dependency treegraph
 
Reported: 2019-09-26 13:59 UTC by Andrew Isherwood
Modified: 2023-12-28 20:43 UTC (History)
11 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Large patch
Documentation contact: Martin Renvoize
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/604
Text to go in the release notes:
This adds a new configuration page for managing user defined and Koha internal patron restrictions to the administration module. If the new system preference PatronRestrictionTypes is enabled, you will also be able to choose the restriction type when manually restricting a patron.
Version(s) released in:
22.11.00


Attachments
Bug 23681: Add PatronRestrictionTypes syspref (3.33 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.39 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.26 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.32 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.42 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.59 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.88 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (1.88 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (4.98 KB, patch)
2019-10-07 09:42 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.33 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.39 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.26 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.41 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.44 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.59 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.91 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.50 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (4.98 KB, patch)
2019-10-07 10:03 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.44 KB, patch)
2019-10-30 11:52 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.39 KB, patch)
2019-10-30 11:52 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.23 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.41 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.44 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.56 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.91 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.50 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (4.98 KB, patch)
2019-10-30 11:53 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.44 KB, patch)
2019-10-31 10:15 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.39 KB, patch)
2019-10-31 10:15 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.23 KB, patch)
2019-10-31 10:15 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.41 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.44 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.56 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.91 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.50 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (4.98 KB, patch)
2019-10-31 10:16 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (691 bytes, patch)
2019-11-07 11:47 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.53 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.48 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.33 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.51 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.53 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.65 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (6.00 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2019-11-11 12:45 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.08 KB, patch)
2019-11-11 12:46 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2019-11-11 12:46 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.53 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.48 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.51 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.53 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.93 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (6.08 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2020-03-02 11:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.08 KB, patch)
2020-03-02 11:28 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2020-03-02 11:28 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-02-09 14:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.98 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.59 KB, patch)
2022-02-09 14:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-03-28 10:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-03-28 10:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-03-28 10:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (5.98 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.59 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.60 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: CSS Build (132.74 KB, patch)
2022-03-28 10:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-03-28 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-03-28 11:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.08 KB, patch)
2022-03-28 11:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.48 KB, patch)
2022-05-03 11:24 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (3.48 KB, patch)
2022-05-03 11:25 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-05-03 11:25 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.50 KB, patch)
2022-05-03 11:26 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-05-03 11:26 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.06 KB, patch)
2022-05-03 11:27 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.91 KB, patch)
2022-05-03 11:27 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.60 KB, patch)
2022-05-03 11:28 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.07 KB, patch)
2022-05-03 11:28 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (793 bytes, patch)
2022-05-03 11:29 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (721 bytes, patch)
2022-05-03 11:29 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.62 KB, patch)
2022-05-03 11:30 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.61 KB, patch)
2022-05-03 11:30 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-05-03 11:31 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.81 KB, patch)
2022-05-03 11:31 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.09 KB, patch)
2022-05-03 11:32 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (25.98 KB, patch)
2022-05-03 11:32 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.79 KB, patch)
2022-05-03 11:32 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-05-04 11:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-05-04 11:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.05 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-05-04 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.61 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.60 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.08 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (25.98 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.79 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.11 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.72 KB, patch)
2022-05-04 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.03 KB, patch)
2022-05-04 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (10.99 KB, patch)
2022-05-04 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Rebuild (3.46 KB, patch)
2022-05-04 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.05 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-05-06 08:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.61 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.60 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.08 KB, patch)
2022-05-06 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (25.98 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.79 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.11 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.72 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.03 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.22 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Rebuild (3.46 KB, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (960 bytes, patch)
2022-05-06 08:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-06-29 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-06-29 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-06-29 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-06-29 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.05 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.61 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.60 KB, patch)
2022-06-29 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.08 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (25.98 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.79 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.17 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.72 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.03 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.22 KB, patch)
2022-06-29 15:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Rebuild (3.46 KB, patch)
2022-06-29 15:13 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (960 bytes, patch)
2022-06-29 15:13 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.47 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.66 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.31 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.49 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.51 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.05 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.90 KB, patch)
2022-07-04 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.59 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.06 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (785 bytes, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (713 bytes, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.61 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.60 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.81 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.80 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.08 KB, patch)
2022-07-04 14:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (25.98 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.79 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.17 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.72 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.03 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.22 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Rebuild (3.46 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (960 bytes, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Add patron restrictions to admin menu (1.15 KB, patch)
2022-07-04 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Remove spacing and add question mark (2.38 KB, patch)
2022-07-04 14:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Match default data to update (1.07 KB, patch)
2022-07-04 14:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix debarment count (1.17 KB, patch)
2022-07-04 14:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix memberentry page display (2.60 KB, patch)
2022-07-04 14:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.53 KB, patch)
2022-07-04 16:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add debarment_types (5.72 KB, patch)
2022-07-04 16:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions perm (5.36 KB, patch)
2022-07-04 16:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add Koha::RestrictionType(s) (3.55 KB, patch)
2022-07-04 16:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add management UI (14.56 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.11 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (5.96 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.65 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.12 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix typo (843 bytes, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (follow-up) Fix rebase issues (770 bytes, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.67 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.66 KB, patch)
2022-07-04 16:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.86 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.85 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix prefs (3.14 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (26.03 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: DO NOT PUSH! Schema changes (2.84 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.23 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.77 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.09 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.28 KB, patch)
2022-07-04 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: DBIC Rebuild (3.51 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (1018 bytes, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Add patron restrictions to admin menu (1.21 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Remove spacing and add question mark (2.43 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Match default data to update (1.13 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix debarment count (1.23 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix memberentry page display (2.66 KB, patch)
2022-07-04 16:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.53 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types table (5.72 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions permission (5.37 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha Classes (3.54 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Management UI (14.62 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.11 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (6.39 KB, patch)
2022-08-17 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.65 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.12 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.67 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.66 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.86 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix preferences (3.15 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.85 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (26.03 KB, patch)
2022-08-17 11:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Schema (4.53 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.19 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.77 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.09 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.32 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (1017 bytes, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Add patron restrictions to admin menu (2.10 KB, patch)
2022-08-17 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Remove spacing and add question mark (2.43 KB, patch)
2022-08-17 11:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix memberentry page display (2.66 KB, patch)
2022-08-17 11:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) debarment_types => restriction_types (6.58 KB, patch)
2022-08-19 17:51 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) New schema files (4.26 KB, patch)
2022-08-19 18:17 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23681: Move to ::Patron::Restriction::Type(s) (22.57 KB, patch)
2022-08-23 08:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Move to ::Patron::Restriction::Type(s) (22.71 KB, patch)
2022-08-24 15:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add PatronRestrictionTypes syspref (3.53 KB, patch)
2022-08-25 11:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add debarment_types table (5.72 KB, patch)
2022-08-25 11:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add modify_patron_restrictions permission (5.37 KB, patch)
2022-08-25 11:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Koha Classes (3.54 KB, patch)
2022-08-25 11:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add Management UI (14.62 KB, patch)
2022-08-25 11:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for changes to debarments (6.06 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Allow for selection of restriction type (6.39 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Clean up on delete (2.65 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Add unit tests (5.12 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Allow for translations (1.67 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Updates for bug 26703 (3.66 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix license, perlcritic & executable (4.86 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix preferences (3.15 KB, patch)
2022-08-25 11:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Rename columns (6.85 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Fix QA issues (26.03 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: DBIC Schema (4.53 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Move preference again (5.19 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Restore customisablity of description (7.77 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Merge update files (7.09 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Proper handling of default option (20.32 KB, patch)
2022-08-25 11:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Mark fields at booleans (1017 bytes, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Add patron restrictions to admin menu (2.10 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Remove spacing and add question mark (2.43 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) Fix memberentry page display (2.66 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) debarment_types => restriction_types (6.58 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (QA follow-up) New schema files (4.25 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: Move to ::Patron::Restriction::Type(s) (22.56 KB, patch)
2022-08-25 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23681: (follow-up) Re-fix ::Patron::Restriction::Type(s) (850 bytes, patch)
2022-08-25 11:47 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2019-09-26 13:59:33 UTC
Currently the patron restrictions are hard coded as enums in borrower_debarments.type, the available values are 'SUSPENSION','OVERDUES','MANUAL','DISCHARGE'.

We (PTFS Europe) have a customer requirement to:

- Provide a select box when adding a patron restriction containing user defined values for restriction types, the user defined values should be defined as authorised values
- Ensure a default value if no restriction type is selected
- Allow the name of the default value to be modifiable
- Ensure that if a restriction type authorised value is removed, any restrictions that use it should revert to the default value
- Make the selection of restriction type optional via a syspref

Currently, at the DB level, the default value is 'MANUAL'.

The plan is to:

DB MIGRATION
------------
- Add authorised_value_categories row for 'PATRON_RESTRICTIONS'
- Add authorised_values.core, default value 0
  - Implies AV cannot be deleted and authorised_values.authorised_value cannot be changed
- Add new borrower_debarments.debarment_type column
- Select distinct values from borrower_debarments.type
- For each $value:
  - Create AV rows:
    - authorised_values.authorised_value = $value
    - authorised_values.lib = $value
    - authorised_values.core = 1
  - ** Note id of each new row, associated with $value
  - update borrower_debarments.debarment_type to be appropriate AV id
  - Remove borrower_debarments.type

OTHER STUFF
-----------

- AV UI (and anything else that can bring about AV modification), should respect "core"
- Modify Patron::Debarments appropriate functions to abstract underlying changes i.e. we maintain backward compatibility with the way they currently work, we just obfuscate the fact that the "type" comes from a different table
- Overload AuthorisedValue::delete to allow us to call optional functions after delete - in a sane world this would be a trigger. This will allow us to set appropriate patron_debarments.debarment_type rows to default value upon AV deletion
Comment 1 Andrew Isherwood 2019-10-01 09:49:44 UTC
It has become increasingly apparent that using authorised values for this is not the most appropriate way forward. The number of modifications and additions to AV was increasing the scope of the work too much, it was clear that AV was not the correct place for this.

Therefore, I am intending creating a table specifically for Patron Restrictions and building the management UI for it, which will be placed probably under "Koha administration" > "Patrons and circulation"
Comment 2 Andrew Isherwood 2019-10-07 09:42:00 UTC Comment hidden (obsolete)
Comment 3 Andrew Isherwood 2019-10-07 09:42:03 UTC Comment hidden (obsolete)
Comment 4 Andrew Isherwood 2019-10-07 09:42:06 UTC Comment hidden (obsolete)
Comment 5 Andrew Isherwood 2019-10-07 09:42:08 UTC Comment hidden (obsolete)
Comment 6 Andrew Isherwood 2019-10-07 09:42:11 UTC Comment hidden (obsolete)
Comment 7 Andrew Isherwood 2019-10-07 09:42:14 UTC Comment hidden (obsolete)
Comment 8 Andrew Isherwood 2019-10-07 09:42:17 UTC Comment hidden (obsolete)
Comment 9 Andrew Isherwood 2019-10-07 09:42:20 UTC Comment hidden (obsolete)
Comment 10 Andrew Isherwood 2019-10-07 09:42:23 UTC Comment hidden (obsolete)
Comment 11 Andrew Isherwood 2019-10-07 09:42:44 UTC
Test plan:

- Apply bug
- Rebuild CSS
=> TEST: Observe a new syspref exists "PatronRestrictionTypes"
- Enable syspref "PatronRestrictionTypes"
- Navigate to your currently logged in patron's "details" page
- Choose More > Set permissions
=> TEST: Observe there is a new permission under "Manage Koha system settings" called "Manage patron restrictions (manage_patron_restrictions)"
- Ensure you are logged in as either a superlibrarian, or assign yourself "manage_patron_restrictions"
- Navigate to "Koha administration"
=> TEST: Observe a new menu option under "Patrons and circulation" called "Patron restrictions"
- Navigate to "Patron restrictions"
=> TEST: Observe that 4 restrictions exist "DISCHARGE", "MANUAL", "OVERDUES", "SUSPENSION"
- Click "New restriction"
- Enter a code and label for the new restriction
=> TEST: Observe that the code can only be entered in uppercase
- Click "Save"
=> TEST: Observe that the new restriction is listed in the table
- On the row containing the new restriction, click "Edit"
=> TEST: Observe that the label can be edited, but the code cannot
- Return to the table
=> TEST: Observe that none of the pre-existing restrictions can be deleted
- Navigate to the details for an existing patron
- Click on the "Restrictions" tab at the bottom
- Click "Add manual restriction"
=> TEST: In the "Type" select box, observe that all 5 restriction types are available for selection
- Select a restriction type
- Enter a comment
- Optionally, choose an expiration date
- Click "Add restriction"
- Return to the "Restrictions" tab
=> TEST: Observe that the newly added restriction is displayed
- Navigate to the patron's "You summary" page in the OPAC
=> Observe that the newly added restriction's "comment" is displayed
Comment 12 Andrew Isherwood 2019-10-07 10:03:19 UTC Comment hidden (obsolete)
Comment 13 Andrew Isherwood 2019-10-07 10:03:22 UTC Comment hidden (obsolete)
Comment 14 Andrew Isherwood 2019-10-07 10:03:25 UTC Comment hidden (obsolete)
Comment 15 Andrew Isherwood 2019-10-07 10:03:28 UTC Comment hidden (obsolete)
Comment 16 Andrew Isherwood 2019-10-07 10:03:31 UTC Comment hidden (obsolete)
Comment 17 Andrew Isherwood 2019-10-07 10:03:34 UTC Comment hidden (obsolete)
Comment 18 Andrew Isherwood 2019-10-07 10:03:37 UTC Comment hidden (obsolete)
Comment 19 Andrew Isherwood 2019-10-07 10:03:40 UTC Comment hidden (obsolete)
Comment 20 Andrew Isherwood 2019-10-07 10:03:43 UTC Comment hidden (obsolete)
Comment 21 Kyle M Hall 2019-10-09 13:04:16 UTC
A couple things:
* Can Koha::RestrictionType(s) be moved to Koha::Patron::RestrictionType(s)
* Can the table debarment_types be renamed to patron_restriction_types so our internal and external terminology match?

Thanks!
Comment 22 Andrew Isherwood 2019-10-09 13:20:13 UTC
Hi Kyle

Thanks for taking a look at this.

>Can Koha::RestrictionType(s) be moved to Koha::Patron::RestrictionType(s)

That's actually how I had it originally. However I moved it since, as far as I could see, everything in Koha::Patron::* was related to a singular patron and represented properties of that patron, which was not the case of RestrictionTypes, which represents the canonical list of restriction types, or a restriction type, not at all related to a patron. I'm happy to move it back if you feel it would be better there, but wanted to explain the rationale.

>Can the table debarment_types be renamed to patron_restriction_types so our internal and external terminology match?

Again, there is a rationale behind this. I named the table "debarment_types" because it was related to a pre-existing table "borrower_debarments" and I felt it would be confusing to name it "restriction_types". I realise that there is a move towards "restriction" rather than "debarment", and I have used the new term in the parts of this bug that are truly new, but where I'm interacting with stuff that's referring to debarments, it felt less confusing to use the same terminology for my bits. Hopefully, at some point, a full sweep of "debarment" => "restriction" will be done, so I felt this was a reasonable interim balance. Again, if you'd rather it be changed, I can do so.

Many thanks!
Comment 23 Martin Renvoize 2019-10-10 07:46:15 UTC
Now that my brain has caught up with Andrews explanation I'm happy here.

Yes, the Object <-> DB naming is inconsistent.. BUT by doing so the DB <-> DB and the Object <-> Object levels are both consistent at their level.  That makes reasonable sense to me, though in reality I'd love to have seen 'debartment' changed to 'restriction' at the DB level consistently at the time we decided to switch terms.. we're now dealing with legacy baggage.

As for RestrictionTypes I'm less sure.. but had a chat with Katrin and she agreed it did make sense as a top level object..   Patron::Restrictions makes sense as they're directly related but Patrons::RestrictionTypes doesn't as it's the restriction itself that has a type and is a level distinct..  Koha::Patron::Restriction::RestrictionTypes seems a little too nested.. so happy to stick to top level object here.
Comment 24 Andrew Isherwood 2019-10-30 11:52:54 UTC Comment hidden (obsolete)
Comment 25 Andrew Isherwood 2019-10-30 11:52:58 UTC Comment hidden (obsolete)
Comment 26 Andrew Isherwood 2019-10-30 11:53:01 UTC Comment hidden (obsolete)
Comment 27 Andrew Isherwood 2019-10-30 11:53:04 UTC Comment hidden (obsolete)
Comment 28 Andrew Isherwood 2019-10-30 11:53:07 UTC Comment hidden (obsolete)
Comment 29 Andrew Isherwood 2019-10-30 11:53:10 UTC Comment hidden (obsolete)
Comment 30 Andrew Isherwood 2019-10-30 11:53:14 UTC Comment hidden (obsolete)
Comment 31 Andrew Isherwood 2019-10-30 11:53:19 UTC Comment hidden (obsolete)
Comment 32 Andrew Isherwood 2019-10-30 11:53:22 UTC Comment hidden (obsolete)
Comment 33 Andrew Isherwood 2019-10-31 10:15:46 UTC Comment hidden (obsolete)
Comment 34 Andrew Isherwood 2019-10-31 10:15:50 UTC Comment hidden (obsolete)
Comment 35 Andrew Isherwood 2019-10-31 10:15:55 UTC Comment hidden (obsolete)
Comment 36 Andrew Isherwood 2019-10-31 10:16:00 UTC Comment hidden (obsolete)
Comment 37 Andrew Isherwood 2019-10-31 10:16:05 UTC Comment hidden (obsolete)
Comment 38 Andrew Isherwood 2019-10-31 10:16:09 UTC Comment hidden (obsolete)
Comment 39 Andrew Isherwood 2019-10-31 10:16:13 UTC Comment hidden (obsolete)
Comment 40 Andrew Isherwood 2019-10-31 10:16:18 UTC Comment hidden (obsolete)
Comment 41 Andrew Isherwood 2019-10-31 10:16:23 UTC Comment hidden (obsolete)
Comment 42 Andrew Isherwood 2019-11-07 11:47:29 UTC Comment hidden (obsolete)
Comment 43 Magnus Enger 2019-11-07 13:34:32 UTC
*** Bug 6775 has been marked as a duplicate of this bug. ***
Comment 44 Andrew Isherwood 2019-11-11 12:45:15 UTC Comment hidden (obsolete)
Comment 45 Andrew Isherwood 2019-11-11 12:45:20 UTC Comment hidden (obsolete)
Comment 46 Andrew Isherwood 2019-11-11 12:45:25 UTC Comment hidden (obsolete)
Comment 47 Andrew Isherwood 2019-11-11 12:45:31 UTC Comment hidden (obsolete)
Comment 48 Andrew Isherwood 2019-11-11 12:45:37 UTC Comment hidden (obsolete)
Comment 49 Andrew Isherwood 2019-11-11 12:45:43 UTC Comment hidden (obsolete)
Comment 50 Andrew Isherwood 2019-11-11 12:45:48 UTC Comment hidden (obsolete)
Comment 51 Andrew Isherwood 2019-11-11 12:45:54 UTC Comment hidden (obsolete)
Comment 52 Andrew Isherwood 2019-11-11 12:46:00 UTC Comment hidden (obsolete)
Comment 53 Andrew Isherwood 2019-11-11 12:46:05 UTC Comment hidden (obsolete)
Comment 54 Jonathan Druart 2020-01-23 10:21:59 UTC
(In reply to Andrew Isherwood from comment #1)
> It has become increasingly apparent that using authorised values for this is
> not the most appropriate way forward. The number of modifications and
> additions to AV was increasing the scope of the work too much, it was clear
> that AV was not the correct place for this.

Why? Can you explain?
That was my first reaction reading the patches.
Using AV will make the feature translatable in the future (bug 20307).
Comment 55 Jonathan Druart 2020-01-23 10:28:19 UTC
So you are adding a regression, the restrictions are no longer translatable.
Comment 56 Jonathan Druart 2020-01-23 10:30:45 UTC
Is the "default" flag really useful? We could imagine a new "internal" flag (to replace ronly) for AVs.
Comment 57 Andrew Isherwood 2020-01-27 09:26:55 UTC
(In reply to Jonathan Druart from comment #54)
> (In reply to Andrew Isherwood from comment #1)
> > It has become increasingly apparent that using authorised values for this is
> > not the most appropriate way forward. The number of modifications and
> > additions to AV was increasing the scope of the work too much, it was clear
> > that AV was not the correct place for this.
> 
> Why? Can you explain?
> That was my first reaction reading the patches.
> Using AV will make the feature translatable in the future (bug 20307).

Clearly AV would have been the preferable route, which is why I spent some considerable time trying to implement using AV before reluctantly abandoning it, it certainly wasn't abandoned lightly. There were too many requirements of this work that were not provided by AV and working around them was becoming increasingly cludgy and unmaintainable.

This work was done a few months ago, so my memory of it isn't what it was, but examples would be:
- the ability to specify a default restriction type, which any restrictions would fall back to if the restriction type they were using was deleted
- the ability to prevent certain restriction types from being edited
- the ability to prevent certain restriction types from being deleted

> So you are adding a regression, the restrictions are no longer translatable.

They were previously held in borrower_debarments.type, they are now in debarment_types, so I'm guessing adding translation support for the default values is not an insurmountable problem, I am happy to add whatever work is required to make that happen to this bug. Any additional values are added by the user anyway, so are by their nature translatable.

>Is the "default" flag really useful? We could imagine a new "internal" flag (to replace ronly) for AVs.

I believe so. Restrictions need a type, even if one is not explicitly chosen. Also, we need an ability to say "if a restriction type is deleted, any restrictions that use this type should fall back to type X", the default flag indicates which type is X.
Comment 58 Jonathan Druart 2020-01-27 10:28:49 UTC
(In reply to Andrew Isherwood from comment #57)
> (In reply to Jonathan Druart from comment #54)
> >Is the "default" flag really useful? We could imagine a new "internal" flag (to replace ronly) for AVs.
> 
> I believe so. Restrictions need a type, even if one is not explicitly
> chosen. Also, we need an ability to say "if a restriction type is deleted,
> any restrictions that use this type should fall back to type X", the default
> flag indicates which type is X.

I do not remember I saw a way to modify it, it's hardcoded in DB (and so could be in the code).
Comment 59 Andrew Isherwood 2020-01-27 12:29:14 UTC
The default (In reply to Jonathan Druart from comment #58)
> > t
> > I believe so. Restrictions need a type, even if one is not explicitly
> > chosen. Also, we need an ability to say "if a restriction type is deleted,
> > any restrictions that use this type should fall back to type X", the default
> > flag indicates which type is X.
> 
> I do not remember I saw a way to modify it, it's hardcoded in DB (and so
> could be in the code).

You're absolutely right, the default must always be "MANUAL" due to the way the restrictions were originally implemented, however the name can be changed so as far as the user is concerned, it can be anything they wish.
Comment 60 Andrew Isherwood 2020-03-02 11:27:34 UTC Comment hidden (obsolete)
Comment 61 Andrew Isherwood 2020-03-02 11:27:37 UTC Comment hidden (obsolete)
Comment 62 Andrew Isherwood 2020-03-02 11:27:40 UTC Comment hidden (obsolete)
Comment 63 Andrew Isherwood 2020-03-02 11:27:44 UTC Comment hidden (obsolete)
Comment 64 Andrew Isherwood 2020-03-02 11:27:47 UTC Comment hidden (obsolete)
Comment 65 Andrew Isherwood 2020-03-02 11:27:51 UTC Comment hidden (obsolete)
Comment 66 Andrew Isherwood 2020-03-02 11:27:54 UTC Comment hidden (obsolete)
Comment 67 Andrew Isherwood 2020-03-02 11:27:58 UTC Comment hidden (obsolete)
Comment 68 Andrew Isherwood 2020-03-02 11:28:01 UTC Comment hidden (obsolete)
Comment 69 Andrew Isherwood 2020-03-02 11:28:05 UTC Comment hidden (obsolete)
Comment 70 Jonathan Druart 2020-04-01 10:58:16 UTC
(In reply to Andrew Isherwood from comment #57)
> (In reply to Jonathan Druart from comment #54)
> > So you are adding a regression, the restrictions are no longer translatable.
> 
> They were previously held in borrower_debarments.type, they are now in
> debarment_types, so I'm guessing adding translation support for the default
> values is not an insurmountable problem, I am happy to add whatever work is
> required to make that happen to this bug. Any additional values are added by
> the user anyway, so are by their nature translatable.

This is a blocker. Please provide a fix.
Comment 71 Jonathan Druart 2020-04-01 13:27:15 UTC
To resume,
We have 4 defaults 'SUSPENSION','OVERDUES','MANUAL','DISCHARGE'. Prior to this patch, they were translatable from the template (see SWITCH in borrower_debarments.inc).
Now you can edit their description in the new admin view, but they cannot be correctly translated (depending on the language of the interface).

I made one suggestion to Andrew: remove the ability to edit the lib for those 4 defaults. So we could still use the SWITCH and default to the description for the others.
But it seems that it won't fit the need of the sponsor.

I do not have another solution however.
Comment 72 Martin Renvoize 2020-04-16 07:05:33 UTC
We need Ben to varify that they really want to change the description of any of the following types:

'Manual', 'Overdues', 'Suspension', 'Discharge'

And, to be honest, those should be easily altered via JS if required.. I don't think this should block the rest of the work.

So.. to me it feels like we just need to take the same approach as we now have with the accounts system, where the original system types are all coded in the template and thus translations are not lost and then we fallback to descriptions from the database for any new types.
Comment 73 Martin Renvoize 2020-04-16 07:12:09 UTC
Comment on attachment 99898 [details] [review]
Bug 23681: Allow for changes to debarments

Review of attachment 99898 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc
@@ -26,5 @@
> -                                    Overdues
> -                                [% CASE 'SUSPENSION' %]
> -                                    Suspension
> -                                [% CASE 'DISCHARGE' %]
> -                                    Discharge

Simply adding

    [% CASE %]
        [% restriction_types.$dtype.display_text | html %]

To the end of this SWITCH block instead of replacing the block entirely should get this passed QA in my opinion.
Comment 74 Martin Renvoize 2021-03-03 15:16:27 UTC
The customer requires being able to change the hard coded values.. as such this bug is blocked until we have translatable authorized values
Comment 75 Katrin Fischer 2022-01-07 14:43:09 UTC
Could we do something like an overwrite option?

We use the default descriptions when the lib/lib_opac are empty and we use the description of those, if they are set?

The other things is me wondering if using authorized value would not only be a temporary solution, making it necessary soon to move debarment types to their own table to be more flexible with configuration. In this case we could have a column for the description too - it would be even a little easier.

And we could then develop the table further to have more columns that make the behavior of a debarment more granular (block renewals, block issuing, block holds, which category types can it be applied to, etc.).
Comment 76 Martin Renvoize 2022-01-07 19:52:13 UTC
(In reply to Katrin Fischer from comment #75)
> Could we do something like an overwrite option?
> 
> We use the default descriptions when the lib/lib_opac are empty and we use
> the description of those, if they are set?
> 

Nope, that would still break translations as Jonathan suggests.  The issue is that you cant define that default for each language.. only a single language.

> The other things is me wondering if using authorized value would not only be
> a temporary solution, making it necessary soon to move debarment types to
> their own table to be more flexible with configuration. In this case we
> could have a column for the description too - it would be even a little
> easier.

This development doesn't use AV's specifically for the reasons you suggest.

> 
> And we could then develop the table further to have more columns that make
> the behavior of a debarment more granular (block renewals, block issuing,
> block holds, which category types can it be applied to, etc.).

I've been waiting years for the AV translations proof work to work their way through.. their holding up a whole plethora of bugs including this one.
Comment 77 Katrin Fischer 2022-01-07 21:03:04 UTC
I thought we could do it similar to account types, just with the addition of allowing to overwrite the standard description. If the overwrite is empty, we use what is in the templates. So we could keep the standard ones translatable.

For the table vs AV - I was didn't read far enough - sorry. 

But... if we are no longer translating an AV... shoudl this not be a little easier in terms of 'hugeness' of development? Maybe it would be easier to start here doing something similar than we have for itemtypes?
Comment 78 Andrew Fuerste-Henry 2022-02-08 21:57:04 UTC
I see this bug is a bit stuck, but commenting to say I like the idea!
Comment 79 Martin Renvoize 2022-02-09 14:37:58 UTC Comment hidden (obsolete)
Comment 80 Martin Renvoize 2022-02-09 14:38:04 UTC Comment hidden (obsolete)
Comment 81 Martin Renvoize 2022-02-09 14:38:09 UTC Comment hidden (obsolete)
Comment 82 Martin Renvoize 2022-02-09 14:38:14 UTC Comment hidden (obsolete)
Comment 83 Martin Renvoize 2022-02-09 14:38:20 UTC Comment hidden (obsolete)
Comment 84 Martin Renvoize 2022-02-09 14:38:24 UTC Comment hidden (obsolete)
Comment 85 Martin Renvoize 2022-02-09 14:38:29 UTC Comment hidden (obsolete)
Comment 86 Martin Renvoize 2022-02-09 14:38:34 UTC Comment hidden (obsolete)
Comment 87 Martin Renvoize 2022-02-09 14:38:39 UTC Comment hidden (obsolete)
Comment 88 Martin Renvoize 2022-02-09 14:38:44 UTC Comment hidden (obsolete)
Comment 89 Martin Renvoize 2022-02-09 14:38:49 UTC Comment hidden (obsolete)
Comment 90 Martin Renvoize 2022-02-09 14:38:54 UTC Comment hidden (obsolete)
Comment 91 Martin Renvoize 2022-02-09 14:40:18 UTC
Rebased and added a follow-up to do as Katrin suggested.. we now use hardcoded translations in the template if the defaults are left unaltered in the existing debarment types.
Comment 92 Katrin Fischer 2022-03-27 12:08:08 UTC
Starting here:

1) QA test tools

Processing files before patches
|========================>| 18 / 18 (100.00%)
Processing files after patches
No schema file found for table debarment_types at /kohadevbox/qa-test-tools/QohA/File/Specific/Kohastructure.pm line 118.
No schema file found for table debarment_types at /kohadevbox/qa-test-tools/QohA/File/Specific/Kohastructure.pm line 118.
|========================>| 18 / 18 (100.00%)

 FAIL	Koha/RestrictionType.pm
   FAIL	  forbidden patterns
		forbidden pattern: Incorrect license statement (using postal address), may be a false positive if the file is coming from outside Koha (bug 24545) (line 16)

 FAIL	Koha/RestrictionTypes.pm
   FAIL	  forbidden patterns
		forbidden pattern: Incorrect license statement (using postal address), may be a false positive if the file is coming from outside Koha (bug 24545) (line 16)

 FAIL	admin/restrictions.pl
   FAIL	  critic
		Subroutine "new" called using indirect syntax at line 27, column 13. See page 349 of PBP.
   FAIL	  forbidden patterns
		forbidden pattern: Script permissions is authnotrequired => 0, it could be correct for an OPAC script if it is was you really want error (bug 24663) (line 38)

 OK	circ/circulation.pl
 OK	installer/data/mysql/kohastructure.sql
 OK	installer/data/mysql/mandatory/sysprefs.sql
 FAIL	koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
   FAIL	  css_and_scss_in_sync
		Found CSS file not in sync with its SCSS file, use yarn build. This is not blocker, testers can generate the .css file if they need it, see https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client

 OK	koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc
 OK	koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
 OK	koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt
   FAIL	  forbidden patterns
		forbidden pattern: Title elements must start with the unique information (bug 26703) (line 6)

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
 OK	koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js
 OK	members/memberentry.pl
 OK	members/mod_debarment.pl
 OK	members/moremember.pl
 FAIL	t/db_dependent/RestrictionType.t
   FAIL	  file permissions
		File must have the exec flag

 FAIL	t/db_dependent/RestrictionTypes.t
   FAIL	  file permissions
		File must have the exec flag

2) Sample data for installer

The sample data added here is .sql not a .yml, but they might contain strings to translate. Can you please verify?
But we still need the .sql files to add to the remaining 'old style' installers.

3) Database structure

ronly and dflt could be improved as column names. ronly = read only, but dlft?
Otherwise as far as I can tell it all seems to match up between new and updated installations.

4) Preference

So the preference is only about the pull down when adding a patron restriction, correct? If you want to make me really happy, please and with a . :) But I believe options need to be changed to 1 and 0?

+         - pref: PatronRestrictionTypes
+           choices:
+               yes: Allow
+               no: Don't allow
+         - "the type of patron restriction to be specified when applying manually"


5) Page title

It needs to be updated to reflect the accessibility work starting with the most specific bits, but I think the QA tool already caught that:

+<title>Koha &rsaquo; Administration &rsaquo; Patron restrictions &rsaquo; [% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% restriction.display_text | html %]'[% ELSE %]New restriction[% END %][% END %]

6) New permission - OK

I wondered if the new permission should be assigned to someone... but I guess it works ok. If the user has module permission already, they will have permission for the new page. Otherwise it will have to be assigned, but existing functionality keeps working meanwhile. So all good.
Comment 93 Martin Renvoize 2022-03-28 10:32:46 UTC Comment hidden (obsolete)
Comment 94 Martin Renvoize 2022-03-28 10:32:51 UTC Comment hidden (obsolete)
Comment 95 Martin Renvoize 2022-03-28 10:32:55 UTC Comment hidden (obsolete)
Comment 96 Martin Renvoize 2022-03-28 10:33:00 UTC Comment hidden (obsolete)
Comment 97 Martin Renvoize 2022-03-28 10:33:05 UTC Comment hidden (obsolete)
Comment 98 Martin Renvoize 2022-03-28 10:33:09 UTC Comment hidden (obsolete)
Comment 99 Martin Renvoize 2022-03-28 10:33:14 UTC Comment hidden (obsolete)
Comment 100 Martin Renvoize 2022-03-28 10:33:18 UTC Comment hidden (obsolete)
Comment 101 Martin Renvoize 2022-03-28 10:33:23 UTC Comment hidden (obsolete)
Comment 102 Martin Renvoize 2022-03-28 10:33:27 UTC Comment hidden (obsolete)
Comment 103 Martin Renvoize 2022-03-28 10:33:32 UTC Comment hidden (obsolete)
Comment 104 Martin Renvoize 2022-03-28 10:33:37 UTC Comment hidden (obsolete)
Comment 105 Martin Renvoize 2022-03-28 10:33:41 UTC Comment hidden (obsolete)
Comment 106 Martin Renvoize 2022-03-28 10:33:46 UTC Comment hidden (obsolete)
Comment 107 Martin Renvoize 2022-03-28 10:33:51 UTC Comment hidden (obsolete)
Comment 108 Martin Renvoize 2022-03-28 10:35:36 UTC
QA Fixes Done
Comment 109 Martin Renvoize 2022-03-28 10:37:00 UTC
More to do... I missed Katrins extra comments beyond the QA script failure.. oops
Comment 110 Martin Renvoize 2022-03-28 11:42:20 UTC Comment hidden (obsolete)
Comment 111 Martin Renvoize 2022-03-28 11:48:51 UTC Comment hidden (obsolete)
Comment 112 Martin Renvoize 2022-03-28 11:48:56 UTC Comment hidden (obsolete)
Comment 113 Martin Renvoize 2022-03-28 11:51:19 UTC
(In reply to Katrin Fischer from comment #92)
> 2) Sample data for installer
> 
I think this is dealt with by having it in the templates instead

> 
> 3) Database structure
> 
> ronly and dflt could be improved as column names. ronly = read only, but
> dlft?

dflt = default, but this is a reserved word so I updated it to is_system (which other places already use)

> 4) Preference

Done

> 5) Page title

Done

> 6) New permission - OK

I think this is OK.
Comment 114 Katrin Fischer 2022-03-29 06:15:34 UTC
I am sorry, this got rather long again. It might not look like it, but I think we are really close and it WOULD make a great starting point for making the restriction system more granular.

1) Installer data again

(In reply to Martin Renvoize from comment #113)
> (In reply to Katrin Fischer from comment #92)
> > 2) Sample data for installer
> > 
> I think this is dealt with by having it in the templates instead

I had a closer look here and the installer file needs updating one way around or the other:

I we don't want to translate it, it should be in https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/mandatory.

If we don't have it wrong, we should transform to .yml and also add it to fr-FR, the remaining SQL installer. The .yml file structure looks easy enough in how to mark the translatable bits and how to add a description for the installer:
https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/en/mandatory

I either case the .txt needs to be removed.

I think the latter would be the nicer solution, as the display text translated would still be nice for reports and such. (I'd also be in favor of moving account_credit_types and debit_types for that reason, but that's another story :) )

+INSERT INTO debarment_types (code, display_text, readonly, system) VALUES
+    ('MANUAL', 'Manual', 1, 1),
+    ('OVERDUES', 'Overdues', 1, 0),
+    ('SUSPENSION', 'Suspension', 1, 0),
+    ('DISCHARGE', 'Discharge', 1, 0);

2) CSS update

I believe Bug 23681: CSS Build should be dropped. It's expected that you generate the CSS files locally. It might create conflicts, but I can just drop/skip it then.

3) Typo in database update / column names

a)
+                system tinyint(1) NOT NULL DEFAULT 0

Should be: is_system. I've fixed it locally for testing further:
alter table debarment_types rename column system to is_system;

b) I have been thinking more about the different columns and I think there is an error there:

+------------+--------------+----------+-----------+
| code       | display_text | readonly | is_system |
+------------+--------------+----------+-----------+
| DISCHARGE  | Discharge    |        1 |         0 |
| MANUAL     | Manual       |        1 |         1 |
| OVERDUES   | Overdues     |        1 |         0 |
| SUSPENSION | Suspension   |        1 |         0 |
+------------+--------------+----------+-----------+

read_only should be is_system = It's internal, don't change it. Applies to all currently added ones.

is_system, was dflt = default = means it's used when the pref is turned off. So it should be default actually.

AND: I think we need another column:

can_be_added_manually (see account_credit_types for comparison)

Because right now the list of restrictions on the patron account will show ALL restrictions defined in debarment_types and I feel like we are asking for trouble if we allow to set restrictions manually that are supposed to be added automatically. Like a DISCHARGE restriction should be linked to an entry in the discharges table somehow, an OVERDUES restriction can be lifted automatically if all overdues are returned, SUSPENSION is calculated on late returns... I'd feel we might want to leave them out of the pulldown really to keep internal behaviors untouched.


4) System preference (sorry, only saw this in the GUI)

Currently the pref appears under "Patrons > Patron relationships", but this is the section for guarantor and family account stuff. I suggest moving it into the "Accounting > Features" tab, that maybe didn't exist yet when this was first written.

5) Page title

There is a > left at the beginning that should not be there if you look at the tab in the browser.

6) Deleting a restriction

When I try to delete a newly created restriction, I see:
Can't locate object method "_new_from_dbic" via package "Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?) at /kohadevbox/koha/Koha/Object.pm line 237

7) Tests are failing :(

prove t/db_dependent/RestrictionType.t t/db_dependent/RestrictionTypes.t
t/db_dependent/RestrictionType.t ... 1/3 
#   Failed test 'keyed_on_code returns correctly'
#   at t/db_dependent/RestrictionType.t line 58.
#     Structures begin differing at:
#          $got->{MANUAL} = HASH(0x5618db704c68)
#     $expected->{MANUAL} = Does not exist
# Looks like you failed 1 test of 3.
t/db_dependent/RestrictionType.t ... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 
t/db_dependent/RestrictionTypes.t .. 1/6 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row.  SQL that returns multiple rows is DEPRECATED for ->find and ->single at /kohadevbox/koha/Koha/Objects.pm line 96
Can't locate object method "_new_from_dbic" via package "Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?) at /kohadevbox/koha/Koha/Object.pm line 237.
# Looks like your test exited with 11 just after 3.
t/db_dependent/RestrictionTypes.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 3/6 subtests 

Test Summary Report
-------------------
t/db_dependent/RestrictionType.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
t/db_dependent/RestrictionTypes.t (Wstat: 2816 Tests: 3 Failed: 0)
  Non-zer
Comment 115 Emmi Takkinen 2022-05-03 11:24:51 UTC Comment hidden (obsolete)
Comment 116 Emmi Takkinen 2022-05-03 11:25:21 UTC Comment hidden (obsolete)
Comment 117 Emmi Takkinen 2022-05-03 11:25:54 UTC Comment hidden (obsolete)
Comment 118 Emmi Takkinen 2022-05-03 11:26:21 UTC Comment hidden (obsolete)
Comment 119 Emmi Takkinen 2022-05-03 11:26:47 UTC Comment hidden (obsolete)
Comment 120 Emmi Takkinen 2022-05-03 11:27:13 UTC Comment hidden (obsolete)
Comment 121 Emmi Takkinen 2022-05-03 11:27:43 UTC Comment hidden (obsolete)
Comment 122 Emmi Takkinen 2022-05-03 11:28:10 UTC Comment hidden (obsolete)
Comment 123 Emmi Takkinen 2022-05-03 11:28:34 UTC Comment hidden (obsolete)
Comment 124 Emmi Takkinen 2022-05-03 11:29:04 UTC Comment hidden (obsolete)
Comment 125 Emmi Takkinen 2022-05-03 11:29:34 UTC Comment hidden (obsolete)
Comment 126 Emmi Takkinen 2022-05-03 11:30:03 UTC Comment hidden (obsolete)
Comment 127 Emmi Takkinen 2022-05-03 11:30:31 UTC Comment hidden (obsolete)
Comment 128 Emmi Takkinen 2022-05-03 11:31:02 UTC Comment hidden (obsolete)
Comment 129 Emmi Takkinen 2022-05-03 11:31:31 UTC Comment hidden (obsolete)
Comment 130 Emmi Takkinen 2022-05-03 11:32:01 UTC Comment hidden (obsolete)
Comment 131 Emmi Takkinen 2022-05-03 11:32:35 UTC Comment hidden (obsolete)
Comment 132 Emmi Takkinen 2022-05-03 11:32:58 UTC Comment hidden (obsolete)
Comment 133 Emmi Takkinen 2022-05-03 11:38:00 UTC
Rebased patches and added couple new ones where I hopefully catched up all QA issues from comment 114. Also I dropped and obsoleted CSS patch since it broke the UI in several pages and as Katrin stated:

>It's expected that you generate the CSS files locally.
Comment 134 Martin Renvoize 2022-05-03 13:34:42 UTC
Thanks for jumping on this rebase and clean up Emmi, teamwork for the win!
Comment 135 Martin Renvoize 2022-05-03 13:50:02 UTC
Testing follow-ups now..
Comment 136 Martin Renvoize 2022-05-03 13:55:49 UTC
We're back to failing here.. whilst I understand the want to translate the system options, this follow-up breaks the ability to customise those same options for display... which was a core requirement for the original Sponsor.

I'm torn.. I feel you should be able to customise those if you really want to.

I also think that the 'Manual' option should be listed as one you can add manually ;)
Comment 137 Martin Renvoize 2022-05-03 13:57:35 UTC
I also disagree with the syspref move.. this isn't an accounting feature.. it has nothing to do with money.
Comment 138 Martin Renvoize 2022-05-03 14:01:19 UTC
I think the pref should live under circulation or patron tabs somewhere.. we already have some Debartment/Restriction preferences it could perhaps go with.

AutoRemoveOverduesRestrictions, RestrictionBlockRenewing, CumulativeRestrictionPeriods all appear under circulation.. so I reckon that's where if fits.
Comment 139 Martin Renvoize 2022-05-03 14:02:51 UTC
I can happily move the pref.. but the translation vs customisation is a wider issue.. it needs some cleaning up either way, but I need input.
Comment 140 Martin Renvoize 2022-05-03 14:14:38 UTC
See coment 75, 76, 77 and 91 for details about the way translations were handled here.. it was a very deliberate choice to leave them as translations in the Templates and not move them to the Database.. but moving them to the database here we loose the ability to define custom display texts locally.
Comment 141 Martin Renvoize 2022-05-03 15:45:14 UTC
Working on follow-ups
Comment 142 Emmi Takkinen 2022-05-04 06:54:07 UTC
(In reply to Martin Renvoize from comment #137)
> I also disagree with the syspref move.. this isn't an accounting feature..
> it has nothing to do with money.

Oof, I misunderstood "Accounting" part here. Accounting => account => everything that has something to do with handling patrons account :') But I agree, the syspref should probably be put either under Patron->General or maybe Circulation->Checkout, since most of the other similar sysprefs are there (personally I think we could have section for restrictions or even general section for patron account handling but that's a whole different thing).

As for not being able to modify default restrictions, that's a mistake in code. This line 
> $restriction->display_text($display_text);  
should be above unless statement. After moving it system restrictions can at least be modified from UI.
Comment 143 Emmi Takkinen 2022-05-04 07:07:54 UTC
And I forgot to add to my first comment, I didn't include fr-FR translated files in these patches as Katrin suggested, since I'm not a native speaker/don't even speak french :D So they are still missing from here.
Comment 144 Martin Renvoize 2022-05-04 07:21:03 UTC
Hi Emmi, 

I do really appreciate your work here, hope I didn't come across mean in my comments.. it turned out a little more verbose than intended as I worked out how it all fits together again.

Do you happen to still have a branch around for this?  I've got a couple of follow-up patches to add but I've discovered that when trying to apply the patches from here I get some weird unexpected conflicts and the result is that we somehow drop a patch when applying at the moment.

If you still have the branch, I could use that as a base to try and work on the fixes.
Comment 145 Emmi Takkinen 2022-05-04 08:05:17 UTC
(In reply to Martin Renvoize from comment #144)
> Hi Emmi, 
> 
> I do really appreciate your work here, hope I didn't come across mean in my
> comments.. it turned out a little more verbose than intended as I worked out
> how it all fits together again.
> 
You didn't sound mean at all, so don't worry :o And I understand perfectly that these thinks tend to turn out more complex than they first look :D 

> Do you happen to still have a branch around for this?  I've got a couple of
> follow-up patches to add but I've discovered that when trying to apply the
> patches from here I get some weird unexpected conflicts and the result is
> that we somehow drop a patch when applying at the moment.
> 
> If you still have the branch, I could use that as a base to try and work on
> the fixes.

I do, here: https://github.com/emta001/Koha/tree/bug-23681 Can you get it from there?
Comment 146 Martin Renvoize 2022-05-04 09:28:44 UTC
Awesome, that worked perfectly.. no idea why the patches on BZ apply weirdly.

Right.. I'll add my follow-ups shortly.. may squash a few patches too, but keep enough that we get all the attributions after so many people have worked on this.
Comment 147 Martin Renvoize 2022-05-04 11:41:49 UTC Comment hidden (obsolete)
Comment 148 Martin Renvoize 2022-05-04 11:41:55 UTC Comment hidden (obsolete)
Comment 149 Martin Renvoize 2022-05-04 11:42:01 UTC Comment hidden (obsolete)
Comment 150 Martin Renvoize 2022-05-04 11:42:09 UTC Comment hidden (obsolete)
Comment 151 Martin Renvoize 2022-05-04 11:42:16 UTC Comment hidden (obsolete)
Comment 152 Martin Renvoize 2022-05-04 11:42:22 UTC Comment hidden (obsolete)
Comment 153 Martin Renvoize 2022-05-04 11:42:29 UTC Comment hidden (obsolete)
Comment 154 Martin Renvoize 2022-05-04 11:42:35 UTC Comment hidden (obsolete)
Comment 155 Martin Renvoize 2022-05-04 11:42:42 UTC Comment hidden (obsolete)
Comment 156 Martin Renvoize 2022-05-04 11:42:49 UTC Comment hidden (obsolete)
Comment 157 Martin Renvoize 2022-05-04 11:42:56 UTC Comment hidden (obsolete)
Comment 158 Martin Renvoize 2022-05-04 11:43:02 UTC Comment hidden (obsolete)
Comment 159 Martin Renvoize 2022-05-04 11:43:09 UTC Comment hidden (obsolete)
Comment 160 Martin Renvoize 2022-05-04 11:43:16 UTC Comment hidden (obsolete)
Comment 161 Martin Renvoize 2022-05-04 11:43:23 UTC Comment hidden (obsolete)
Comment 162 Martin Renvoize 2022-05-04 11:43:29 UTC Comment hidden (obsolete)
Comment 163 Martin Renvoize 2022-05-04 11:43:36 UTC Comment hidden (obsolete)
Comment 164 Martin Renvoize 2022-05-04 11:43:43 UTC Comment hidden (obsolete)
Comment 165 Martin Renvoize 2022-05-04 11:43:49 UTC Comment hidden (obsolete)
Comment 166 Martin Renvoize 2022-05-04 11:43:57 UTC Comment hidden (obsolete)
Comment 167 Martin Renvoize 2022-05-04 11:44:04 UTC Comment hidden (obsolete)
Comment 168 Martin Renvoize 2022-05-04 11:44:11 UTC Comment hidden (obsolete)
Comment 169 Martin Renvoize 2022-05-04 11:44:17 UTC Comment hidden (obsolete)
Comment 170 Martin Renvoize 2022-05-04 11:47:49 UTC
That was "fun"..

The patchset now all applies cleanly again and I believe the default handling now works as requested along with only displaying non system types as manually addable.

The translation options are also fixed.

Back to the QA queue
Comment 171 Katrin Fischer 2022-05-06 06:49:16 UTC
There is one fail in the QA test tools here:

 FAIL	installer/data/mysql/kohastructure.sql
   FAIL	  tinyint_has_boolean_flag
		The new column debarment_types.is_system is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/DebarmentType.pm), see the SQL12 coding guideline
		The new column debarment_types.is_default is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/DebarmentType.pm), see the SQL12 coding guideline
Comment 172 Katrin Fischer 2022-05-06 06:52:03 UTC
Also tests are failing:

prove t/db_dependent/RestrictionType.t t/db_dependent/RestrictionTypes.t
t/db_dependent/RestrictionType.t ... 1/3 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.default_value' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 96
# Looks like your test exited with 11 just after 2.
t/db_dependent/RestrictionType.t ... Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 1/3 subtests 
t/db_dependent/RestrictionTypes.t .. 1/6 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.default_value' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 96
# Looks like your test exited with 11 just after 3.
t/db_dependent/RestrictionTypes.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 3/6 subtests 

Test Summary Report
-------------------
t/db_dependent/RestrictionType.t (Wstat: 2816 Tests: 2 Failed: 0)
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 3 tests but ran 2.
t/db_dependent/RestrictionTypes.t (Wstat: 2816 Tests: 3 Failed: 0)
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 6 tests but ran 3.
Files=2, Tests=5,  2 wallclock secs ( 0.01 usr  0.01 sys +  1.88 cusr  0.15 csys =  2.05 CPU)
Result: FAIL


I made sure to apply the database update before running the tests.

Can you please check?
Comment 173 Martin Renvoize 2022-05-06 08:40:17 UTC Comment hidden (obsolete)
Comment 174 Martin Renvoize 2022-05-06 08:40:24 UTC Comment hidden (obsolete)
Comment 175 Martin Renvoize 2022-05-06 08:40:30 UTC Comment hidden (obsolete)
Comment 176 Martin Renvoize 2022-05-06 08:40:36 UTC Comment hidden (obsolete)
Comment 177 Martin Renvoize 2022-05-06 08:40:43 UTC Comment hidden (obsolete)
Comment 178 Martin Renvoize 2022-05-06 08:40:48 UTC Comment hidden (obsolete)
Comment 179 Martin Renvoize 2022-05-06 08:40:55 UTC Comment hidden (obsolete)
Comment 180 Martin Renvoize 2022-05-06 08:41:01 UTC Comment hidden (obsolete)
Comment 181 Martin Renvoize 2022-05-06 08:41:07 UTC Comment hidden (obsolete)
Comment 182 Martin Renvoize 2022-05-06 08:41:14 UTC Comment hidden (obsolete)
Comment 183 Martin Renvoize 2022-05-06 08:41:21 UTC Comment hidden (obsolete)
Comment 184 Martin Renvoize 2022-05-06 08:41:28 UTC Comment hidden (obsolete)
Comment 185 Martin Renvoize 2022-05-06 08:41:35 UTC Comment hidden (obsolete)
Comment 186 Martin Renvoize 2022-05-06 08:41:42 UTC Comment hidden (obsolete)
Comment 187 Martin Renvoize 2022-05-06 08:41:48 UTC Comment hidden (obsolete)
Comment 188 Martin Renvoize 2022-05-06 08:41:54 UTC Comment hidden (obsolete)
Comment 189 Martin Renvoize 2022-05-06 08:42:01 UTC Comment hidden (obsolete)
Comment 190 Martin Renvoize 2022-05-06 08:42:07 UTC Comment hidden (obsolete)
Comment 191 Martin Renvoize 2022-05-06 08:42:13 UTC Comment hidden (obsolete)
Comment 192 Martin Renvoize 2022-05-06 08:42:20 UTC Comment hidden (obsolete)
Comment 193 Martin Renvoize 2022-05-06 08:42:26 UTC Comment hidden (obsolete)
Comment 194 Martin Renvoize 2022-05-06 08:42:33 UTC Comment hidden (obsolete)
Comment 195 Martin Renvoize 2022-05-06 08:42:39 UTC Comment hidden (obsolete)
Comment 196 Martin Renvoize 2022-05-06 08:42:45 UTC Comment hidden (obsolete)
Comment 197 Martin Renvoize 2022-05-06 08:44:06 UTC
One more little follow-up for the booleans issue and a rebase to fix the other problems.

Hopefully it should all be passing now Katrin :)
Comment 198 Katrin Fischer 2022-06-29 14:27:18 UTC
Could you please rebase?
Comment 199 Martin Renvoize 2022-06-29 15:10:37 UTC Comment hidden (obsolete)
Comment 200 Martin Renvoize 2022-06-29 15:10:44 UTC Comment hidden (obsolete)
Comment 201 Martin Renvoize 2022-06-29 15:10:51 UTC Comment hidden (obsolete)
Comment 202 Martin Renvoize 2022-06-29 15:10:57 UTC Comment hidden (obsolete)
Comment 203 Martin Renvoize 2022-06-29 15:11:04 UTC Comment hidden (obsolete)
Comment 204 Martin Renvoize 2022-06-29 15:11:11 UTC Comment hidden (obsolete)
Comment 205 Martin Renvoize 2022-06-29 15:11:18 UTC Comment hidden (obsolete)
Comment 206 Martin Renvoize 2022-06-29 15:11:25 UTC Comment hidden (obsolete)
Comment 207 Martin Renvoize 2022-06-29 15:11:31 UTC Comment hidden (obsolete)
Comment 208 Martin Renvoize 2022-06-29 15:11:38 UTC Comment hidden (obsolete)
Comment 209 Martin Renvoize 2022-06-29 15:11:45 UTC Comment hidden (obsolete)
Comment 210 Martin Renvoize 2022-06-29 15:11:52 UTC Comment hidden (obsolete)
Comment 211 Martin Renvoize 2022-06-29 15:11:58 UTC Comment hidden (obsolete)
Comment 212 Martin Renvoize 2022-06-29 15:12:05 UTC Comment hidden (obsolete)
Comment 213 Martin Renvoize 2022-06-29 15:12:12 UTC Comment hidden (obsolete)
Comment 214 Martin Renvoize 2022-06-29 15:12:18 UTC Comment hidden (obsolete)
Comment 215 Martin Renvoize 2022-06-29 15:12:25 UTC Comment hidden (obsolete)
Comment 216 Martin Renvoize 2022-06-29 15:12:31 UTC Comment hidden (obsolete)
Comment 217 Martin Renvoize 2022-06-29 15:12:38 UTC Comment hidden (obsolete)
Comment 218 Martin Renvoize 2022-06-29 15:12:46 UTC Comment hidden (obsolete)
Comment 219 Martin Renvoize 2022-06-29 15:12:52 UTC Comment hidden (obsolete)
Comment 220 Martin Renvoize 2022-06-29 15:12:59 UTC Comment hidden (obsolete)
Comment 221 Martin Renvoize 2022-06-29 15:13:05 UTC Comment hidden (obsolete)
Comment 222 Martin Renvoize 2022-06-29 15:13:13 UTC Comment hidden (obsolete)
Comment 223 Martin Renvoize 2022-06-29 15:18:58 UTC
Rebased
Comment 224 Katrin Fischer 2022-07-04 10:00:22 UTC
Starting QA here:

0) Tests pass. QA script complains a lot about "added and removed in the same patch set", we could consider some squashing. Database update is missing execute permission.

1) The new patron restrictions configuration page is missing from the Administration side menu, visible when you are on any of the admin pages. It's ok on the start page of the module.

2) The delete confirmation question is missing a question mark :) (also might want to remove the additional spaces)
Are you sure you want to delete " Test "

I'd also make the button just "Delete" or "Yes, delete", but that's a personal preference and I see that this was 'copied' from how deleting a patron category looks like.

3) After installing/updating with this patch, MANUAL is marked es the default. You cannot change it, until you have added a new restriction, which makes sense, as the system internal ones should not be default. But: you cannot ever change the default back to MANUAL. I think this is because system internal values are excluded, but it might raise complaints for people experimenting with the feature that want to restore previous behavior.

4) Just a comment: Love the new Patron restrictions sub heading in patron preferences :)

5) When adding a manual restriction to the patron account, the default seems to be only used when PatronRestrictionTypes is off, when it's on and the pull down shows, the default is not preselected, but the first entry is. 

6) Something super odd: In the patron account in the staff interface, on the checkout tab, the Restrictions shows as (0), while on the details tab the restrictions show the correct number (2) I have added. Only the tab heading is wrong, otherwise the restrictions show ok.

7) When editing the patron record, the pull down for restriction type is empty.

8) I notice that the type itself doesn't show up in the OPAC or the note on the patron account in staff, just the comments do. This is the case with and without the patches, maybe something so consider later. Or we could imagine adding a default comment? (no blocker, just loud thinking)
Comment 225 Martin Renvoize 2022-07-04 11:07:18 UTC
(In reply to Katrin Fischer from comment #224)
> Starting QA here:
> 
> 0) Tests pass. QA script complains a lot about "added and removed in the
> same patch set", we could consider some squashing. Database update is
> missing execute permission.

I think this is a QA script mis-identification.. the file it mentions is also mentioned in the git manip.. i.e. it no longer exists and the remaining renamed file does have the exec bit set.
Comment 226 Katrin Fischer 2022-07-04 11:10:02 UTC
(In reply to Martin Renvoize from comment #225)
> (In reply to Katrin Fischer from comment #224)
> > Starting QA here:
> > 
> > 0) Tests pass. QA script complains a lot about "added and removed in the
> > same patch set", we could consider some squashing. Database update is
> > missing execute permission.
> 
> I think this is a QA script mis-identification.. the file it mentions is
> also mentioned in the git manip.. i.e. it no longer exists and the remaining
> renamed file does have the exec bit set.

I think you are right about this one.
Comment 227 Martin Renvoize 2022-07-04 14:18:20 UTC Comment hidden (obsolete)
Comment 228 Martin Renvoize 2022-07-04 14:18:26 UTC Comment hidden (obsolete)
Comment 229 Martin Renvoize 2022-07-04 14:18:32 UTC Comment hidden (obsolete)
Comment 230 Martin Renvoize 2022-07-04 14:18:40 UTC Comment hidden (obsolete)
Comment 231 Martin Renvoize 2022-07-04 14:18:46 UTC Comment hidden (obsolete)
Comment 232 Martin Renvoize 2022-07-04 14:18:52 UTC Comment hidden (obsolete)
Comment 233 Martin Renvoize 2022-07-04 14:18:58 UTC Comment hidden (obsolete)
Comment 234 Martin Renvoize 2022-07-04 14:19:05 UTC Comment hidden (obsolete)
Comment 235 Martin Renvoize 2022-07-04 14:19:11 UTC Comment hidden (obsolete)
Comment 236 Martin Renvoize 2022-07-04 14:19:17 UTC Comment hidden (obsolete)
Comment 237 Martin Renvoize 2022-07-04 14:19:23 UTC Comment hidden (obsolete)
Comment 238 Martin Renvoize 2022-07-04 14:19:29 UTC Comment hidden (obsolete)
Comment 239 Martin Renvoize 2022-07-04 14:19:35 UTC Comment hidden (obsolete)
Comment 240 Martin Renvoize 2022-07-04 14:19:41 UTC Comment hidden (obsolete)
Comment 241 Martin Renvoize 2022-07-04 14:19:48 UTC Comment hidden (obsolete)
Comment 242 Martin Renvoize 2022-07-04 14:19:54 UTC Comment hidden (obsolete)
Comment 243 Martin Renvoize 2022-07-04 14:20:00 UTC Comment hidden (obsolete)
Comment 244 Martin Renvoize 2022-07-04 14:20:09 UTC Comment hidden (obsolete)
Comment 245 Martin Renvoize 2022-07-04 14:20:16 UTC Comment hidden (obsolete)
Comment 246 Martin Renvoize 2022-07-04 14:20:23 UTC Comment hidden (obsolete)
Comment 247 Martin Renvoize 2022-07-04 14:20:30 UTC Comment hidden (obsolete)
Comment 248 Martin Renvoize 2022-07-04 14:20:36 UTC Comment hidden (obsolete)
Comment 249 Martin Renvoize 2022-07-04 14:20:43 UTC Comment hidden (obsolete)
Comment 250 Martin Renvoize 2022-07-04 14:20:49 UTC Comment hidden (obsolete)
Comment 251 Martin Renvoize 2022-07-04 14:20:56 UTC Comment hidden (obsolete)
Comment 252 Martin Renvoize 2022-07-04 14:21:02 UTC Comment hidden (obsolete)
Comment 253 Martin Renvoize 2022-07-04 14:21:09 UTC Comment hidden (obsolete)
Comment 254 Martin Renvoize 2022-07-04 14:21:15 UTC Comment hidden (obsolete)
Comment 255 Martin Renvoize 2022-07-04 14:21:22 UTC Comment hidden (obsolete)
Comment 256 Martin Renvoize 2022-07-04 14:26:49 UTC
(In reply to Katrin Fischer from comment #224)
> 1) The new patron restrictions configuration page is missing from the
> Administration side menu, visible when you are on any of the admin pages.
> It's ok on the start page of the module.

Fixed in follow-up

> 2) The delete confirmation question is missing a question mark :) (also
> might want to remove the additional spaces)
> Are you sure you want to delete " Test "

Fixed in follow-up

> I'd also make the button just "Delete" or "Yes, delete", but that's a
> personal preference and I see that this was 'copied' from how deleting a
> patron category looks like.

Hmm, I'd love to see us standardise on something and create a guideline about it.. at that time I'd be keen to go through and get everything consistent.

> 3) After installing/updating with this patch, MANUAL is marked es the
> default. You cannot change it, until you have added a new restriction, which
> makes sense, as the system internal ones should not be default. But: you
> cannot ever change the default back to MANUAL. I think this is because
> system internal values are excluded, but it might raise complaints for
> people experimenting with the feature that want to restore previous behavior.

I discovered the update and the install data were out of sync.. fixed in a follow-up. This resolves the defaulting issue.
 
> 4) Just a comment: Love the new Patron restrictions sub heading in patron
> preferences :)

Glad you like it :)

> 5) When adding a manual restriction to the patron account, the default seems
> to be only used when PatronRestrictionTypes is off, when it's on and the
> pull down shows, the default is not preselected, but the first entry is. 

Hmm, I couldn't replicate this.
 
> 6) Something super odd: In the patron account in the staff interface, on the
> checkout tab, the Restrictions shows as (0), while on the details tab the
> restrictions show the correct number (2) I have added. Only the tab heading
> is wrong, otherwise the restrictions show ok.

Unrelated to this patchset I believe.. bit it is fixed in a follow-up now.
 
> 7) When editing the patron record, the pull down for restriction type is
> empty.

Fixed in follow-up.

> 8) I notice that the type itself doesn't show up in the OPAC or the note on
> the patron account in staff, just the comments do. This is the case with and
> without the patches, maybe something so consider later. Or we could imagine
> adding a default comment? (no blocker, just loud thinking)

Wow.. wierd.. I'd never noticed that.. can we submit a new bug for that one?
Comment 257 Katrin Fischer 2022-07-04 14:30:33 UTC
(In reply to Martin Renvoize from comment #256)
> (In reply to Katrin Fischer from comment #224)
> 
> > I'd also make the button just "Delete" or "Yes, delete", but that's a
> > personal preference and I see that this was 'copied' from how deleting a
> > patron category looks like.
> 
> Hmm, I'd love to see us standardise on something and create a guideline
> about it.. at that time I'd be keen to go through and get everything
> consistent.

Agreed, I was just wondering, because in German such buttons tend to get huge.
> 
> > 3) After installing/updating with this patch, MANUAL is marked es the
> > default. You cannot change it, until you have added a new restriction, which
> > makes sense, as the system internal ones should not be default. But: you
> > cannot ever change the default back to MANUAL. I think this is because
> > system internal values are excluded, but it might raise complaints for
> > people experimenting with the feature that want to restore previous behavior.
> 
> I discovered the update and the install data were out of sync.. fixed in a
> follow-up. This resolves the defaulting issue.

Good catch! Will retest.

> > 5) When adding a manual restriction to the patron account, the default seems
> > to be only used when PatronRestrictionTypes is off, when it's on and the
> > pull down shows, the default is not preselected, but the first entry is. 
> 
> Hmm, I couldn't replicate this.

I'll retest.


> > 8) I notice that the type itself doesn't show up in the OPAC or the note on
> > the patron account in staff, just the comments do. This is the case with and
> > without the patches, maybe something so consider later. Or we could imagine
> > adding a default comment? (no blocker, just loud thinking)
> 
> Wow.. wierd.. I'd never noticed that.. can we submit a new bug for that one?

Yes, loud thinking definitely warrants a separate bug. I'd also not noticed that before, but it's unchanged by this patch set.
Comment 258 Katrin Fischer 2022-07-04 16:11:28 UTC
0) QA script + unit tests
RESOLVED

1) Side menu 
RESOLVED

2) Delete confirmation
RESOLVED

3) Default behavior / MANUAL
RESOLVED

4) :)

5) Pre-selection in pull down
Retested and RESOLVED. 

6) Number in restrictions tab
RESOLVED

7) When editing the patron record, the pull down for restriction type is empty.
RESOLVED

8) Show restriction type in places
MOVE to separate bug later :)
Comment 259 Katrin Fischer 2022-07-04 16:14:36 UTC
Created attachment 137102 [details] [review]
Bug 23681: Add PatronRestrictionTypes syspref

This patch adds the new syspref "PatronRestrictionTypes"

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 260 Katrin Fischer 2022-07-04 16:14:44 UTC
Created attachment 137103 [details] [review]
Bug 23681: Add debarment_types

This patch adds the table debarment_types and changes
borrower_debarments.type to be a foreign key to it

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 261 Katrin Fischer 2022-07-04 16:14:52 UTC
Created attachment 137104 [details] [review]
Bug 23681: Add modify_patron_restrictions perm

This patch adds a new "modify_patron_restrictions" permission

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 262 Katrin Fischer 2022-07-04 16:14:59 UTC
Created attachment 137105 [details] [review]
Bug 23681: Add Koha::RestrictionType(s)

This patch adds the following objects:

Koha::RestrictionType
Koha::RestrictionTypes

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 263 Katrin Fischer 2022-07-04 16:15:07 UTC
Created attachment 137106 [details] [review]
Bug 23681: Add management UI

This patch adds UI to allow CRUD operations on restriction types

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 264 Katrin Fischer 2022-07-04 16:15:13 UTC
Created attachment 137107 [details] [review]
Bug 23681: Allow for changes to debarments

The structure of debarments has changes slightly in that the displayed
text is now a product of a call to Koha::RestrictionTypes rather than
just the debarment's code. This patch allows for that

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 265 Katrin Fischer 2022-07-04 16:15:20 UTC
Created attachment 137108 [details] [review]
Bug 23681: Allow for selection of restriction type

This patch displays a restriction type select box (when appropriate)
when adding manual patron restrictions

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 266 Katrin Fischer 2022-07-04 16:15:26 UTC
Created attachment 137109 [details] [review]
Bug 23681: Clean up on delete

When a patron restriction type is deleted, any debarments that use that
type need to revert to the default type, this patch implements this
behaviour

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 267 Katrin Fischer 2022-07-04 16:15:32 UTC
Created attachment 137110 [details] [review]
Bug 23681: Add unit tests

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 268 Katrin Fischer 2022-07-04 16:15:38 UTC
Created attachment 137111 [details] [review]
Bug 23681: (follow-up) Fix typo

Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Sponsored-by: Loughborough University

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 269 Katrin Fischer 2022-07-04 16:15:45 UTC
Created attachment 137112 [details] [review]
Bug 23681: (follow-up) Fix rebase issues

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 270 Katrin Fischer 2022-07-04 16:15:51 UTC
Created attachment 137113 [details] [review]
Bug 23681: (QA follow-up) Allow for translations

This patch allows for existing translations to follow through if
debarment type descriptions are left unaltered for the default types.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 271 Katrin Fischer 2022-07-04 16:15:57 UTC
Created attachment 137114 [details] [review]
Bug 23681: Updates for bug 26703

This patch fixes the title ordering and also replaces the breadcrumbs
with the modern nav block equivilent

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 272 Katrin Fischer 2022-07-04 16:16:04 UTC
Created attachment 137115 [details] [review]
Bug 23681: (QA follow-up) Fix license, perlcritic & executable

This patch fixes the simple issues mentioned by the QA script.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 273 Katrin Fischer 2022-07-04 16:16:10 UTC
Created attachment 137116 [details] [review]
Bug 23681: (QA follow-up) Rename columns

Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 274 Katrin Fischer 2022-07-04 16:16:17 UTC
Created attachment 137117 [details] [review]
Bug 23681: (QA follow-up) Fix prefs

Add the missing `.` and switch from `yes/no` to `1/0`.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 275 Katrin Fischer 2022-07-04 16:16:23 UTC
Created attachment 137118 [details] [review]
Bug 23681: Fix QA issues

This patch fixes following QA issues:
- convert intaller files as .yml
- change column name readonly as is_system
- change column name is_system as default_value
- add column can_be_added_manually (testplan for this below)
- move syspref "PatronRestrictionTypes" to "Accounting > Features" tab
- tweak page title
- tweak tests to apply these changes

Also atomicupdate files have been updated. Issues with delete and tests
is fixed with adding additional schema change file.

To test:
1) Add new restriction type and make it manual.
2) Navigate to patron details page.
3) Add new restriction to patron.
=> Only selectable restriction should be the one
you just created.

Also prove t/db_dependent/RestrictionTypes.t.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 276 Katrin Fischer 2022-07-04 16:16:30 UTC
Created attachment 137119 [details] [review]
Bug 23681: DO NOT PUSH! Schema changes

To be able to delete and pass tests we need to declare
koha_object[s]_class to DebarmentType.pm. Otherwise
following error is raised:

"Can't locate object method "_new_from_dbic" via package
"Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?)
at /kohadevbox/koha/Koha/Object.pm line 237"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 277 Katrin Fischer 2022-07-04 16:16:36 UTC
Created attachment 137120 [details] [review]
Bug 23681: (QA follow-up) Move preference again

This patch removes the new PatronRestrictionTypes preference from the
accounting area in preference to creating a new group for 'Patron
restriction' related preferences in the circulation preferences tab.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 278 Katrin Fischer 2022-07-04 16:16:42 UTC
Created attachment 137121 [details] [review]
Bug 23681: (QA follow-up) Restore customisablity of description

This patch restores the customisability of description for system restriction
types. Translatability is not affected as you can translate the defaults
via template translation and assuming the end users leave their
descriptions at the default, the translations will be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 279 Katrin Fischer 2022-07-04 16:16:48 UTC
Created attachment 137122 [details] [review]
Bug 23681: (QA follow-up) Merge update files

This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 280 Katrin Fischer 2022-07-04 16:16:55 UTC
Created attachment 137123 [details] [review]
Bug 23681: (QA follow-up) Proper handling of default option

This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 281 Katrin Fischer 2022-07-04 16:17:02 UTC
Created attachment 137124 [details] [review]
Bug 23681: DBIC Rebuild

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 282 Katrin Fischer 2022-07-04 16:17:08 UTC
Created attachment 137125 [details] [review]
Bug 23681: (follow-up) Mark fields at booleans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 283 Katrin Fischer 2022-07-04 16:17:15 UTC
Created attachment 137126 [details] [review]
Bug 23681: (QA follow-up) Add patron restrictions to admin menu

This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 284 Katrin Fischer 2022-07-04 16:17:21 UTC
Created attachment 137127 [details] [review]
Bug 23681: (QA follow-up) Remove spacing and add question mark

This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 285 Katrin Fischer 2022-07-04 16:17:27 UTC
Created attachment 137128 [details] [review]
Bug 23681: (QA follow-up) Match default data to update

The default data at install time didn't match the data added at update.

This patch corrects that and by doing so it also adds back the ability
to make MANUAL restriction types the default after any other type has
been made default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 286 Katrin Fischer 2022-07-04 16:17:33 UTC
Created attachment 137129 [details] [review]
Bug 23681: (QA follow-up) Fix debarment count

This patch fixes the debarment count displayed on the circulation page
tabs

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 287 Katrin Fischer 2022-07-04 16:17:40 UTC
Created attachment 137130 [details] [review]
Bug 23681: (QA follow-up) Fix memberentry page display

We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 288 Tomás Cohen Arazi 2022-08-16 18:40:30 UTC
Can you please rebase? I'll make sure I take care of it once you rebase to avoid further delays.
Comment 289 Tomás Cohen Arazi 2022-08-16 18:41:13 UTC
I would like to see some squashing as well. But not trying to complicate things too much.
Comment 290 Martin Renvoize 2022-08-17 11:19:14 UTC
Created attachment 139250 [details] [review]
Bug 23681: Add PatronRestrictionTypes syspref

This patch adds the new syspref "PatronRestrictionTypes"

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 291 Martin Renvoize 2022-08-17 11:19:21 UTC
Created attachment 139251 [details] [review]
Bug 23681: Add debarment_types table

This patch adds the table debarment_types and changes
borrower_debarments.type to be a foreign key to it

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 292 Martin Renvoize 2022-08-17 11:19:28 UTC
Created attachment 139252 [details] [review]
Bug 23681: Add modify_patron_restrictions permission

This patch adds a new "modify_patron_restrictions" permission

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 293 Martin Renvoize 2022-08-17 11:19:35 UTC
Created attachment 139253 [details] [review]
Bug 23681: Add Koha Classes

This patch adds the following objects:

Koha::RestrictionType
Koha::RestrictionTypes

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 294 Martin Renvoize 2022-08-17 11:19:42 UTC
Created attachment 139254 [details] [review]
Bug 23681: Add Management UI

This patch adds UI to allow CRUD operations on restriction types

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 295 Martin Renvoize 2022-08-17 11:19:49 UTC
Created attachment 139255 [details] [review]
Bug 23681: Allow for changes to debarments

The structure of debarments has changes slightly in that the displayed
text is now a product of a call to Koha::RestrictionTypes rather than
just the debarment's code. This patch allows for that

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 296 Martin Renvoize 2022-08-17 11:19:57 UTC
Created attachment 139256 [details] [review]
Bug 23681: Allow for selection of restriction type

This patch displays a restriction type select box (when appropriate)
when adding manual patron restrictions

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 297 Martin Renvoize 2022-08-17 11:20:04 UTC
Created attachment 139257 [details] [review]
Bug 23681: Clean up on delete

When a patron restriction type is deleted, any debarments that use that
type need to revert to the default type, this patch implements this
behaviour

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 298 Martin Renvoize 2022-08-17 11:20:12 UTC
Created attachment 139258 [details] [review]
Bug 23681: Add unit tests

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 299 Martin Renvoize 2022-08-17 11:20:21 UTC
Created attachment 139259 [details] [review]
Bug 23681: (QA follow-up) Allow for translations

This patch allows for existing translations to follow through if
debarment type descriptions are left unaltered for the default types.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 300 Martin Renvoize 2022-08-17 11:20:29 UTC
Created attachment 139260 [details] [review]
Bug 23681: Updates for bug 26703

This patch fixes the title ordering and also replaces the breadcrumbs
with the modern nav block equivilent

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 301 Martin Renvoize 2022-08-17 11:20:36 UTC
Created attachment 139261 [details] [review]
Bug 23681: (QA follow-up) Fix license, perlcritic & executable

This patch fixes the simple issues mentioned by the QA script.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 302 Martin Renvoize 2022-08-17 11:20:43 UTC
Created attachment 139262 [details] [review]
Bug 23681: (QA follow-up) Fix preferences

Add the missing `.` and switch from `yes/no` to `1/0`.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 303 Martin Renvoize 2022-08-17 11:20:51 UTC
Created attachment 139263 [details] [review]
Bug 23681: (QA follow-up) Rename columns

Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 304 Martin Renvoize 2022-08-17 11:20:58 UTC
Created attachment 139264 [details] [review]
Bug 23681: Fix QA issues

This patch fixes following QA issues:
- convert intaller files as .yml
- change column name readonly as is_system
- change column name is_system as default_value
- add column can_be_added_manually (testplan for this below)
- move syspref "PatronRestrictionTypes" to "Accounting > Features" tab
- tweak page title
- tweak tests to apply these changes

Also atomicupdate files have been updated. Issues with delete and tests
is fixed with adding additional schema change file.

To test:
1) Add new restriction type and make it manual.
2) Navigate to patron details page.
3) Add new restriction to patron.
=> Only selectable restriction should be the one
you just created.

Also prove t/db_dependent/RestrictionTypes.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 305 Martin Renvoize 2022-08-17 11:21:05 UTC
Created attachment 139265 [details] [review]
Bug 23681: DBIC Schema

To be able to delete and pass tests we need to declare
koha_object[s]_class to DebarmentType.pm. Otherwise
following error is raised:

"Can't locate object method "_new_from_dbic" via package
"Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?)
at /kohadevbox/koha/Koha/Object.pm line 237"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 306 Martin Renvoize 2022-08-17 11:21:13 UTC
Created attachment 139266 [details] [review]
Bug 23681: (QA follow-up) Move preference again

This patch removes the new PatronRestrictionTypes preference from the
accounting area in preference to creating a new group for 'Patron
restriction' related preferences in the circulation preferences tab.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 307 Martin Renvoize 2022-08-17 11:21:22 UTC
Created attachment 139267 [details] [review]
Bug 23681: (QA follow-up) Restore customisablity of description

This patch restores the customisability of description for system restriction
types. Translatability is not affected as you can translate the defaults
via template translation and assuming the end users leave their
descriptions at the default, the translations will be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 308 Martin Renvoize 2022-08-17 11:21:29 UTC
Created attachment 139268 [details] [review]
Bug 23681: (QA follow-up) Merge update files

This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 309 Martin Renvoize 2022-08-17 11:21:36 UTC
Created attachment 139269 [details] [review]
Bug 23681: (QA follow-up) Proper handling of default option

This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 310 Martin Renvoize 2022-08-17 11:21:43 UTC
Created attachment 139270 [details] [review]
Bug 23681: (follow-up) Mark fields at booleans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 311 Martin Renvoize 2022-08-17 11:21:51 UTC
Created attachment 139271 [details] [review]
Bug 23681: (QA follow-up) Add patron restrictions to admin menu

This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 312 Martin Renvoize 2022-08-17 11:22:00 UTC
Created attachment 139272 [details] [review]
Bug 23681: (QA follow-up) Remove spacing and add question mark

This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 313 Martin Renvoize 2022-08-17 11:22:07 UTC
Created attachment 139273 [details] [review]
Bug 23681: (QA follow-up) Fix memberentry page display

We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 314 Martin Renvoize 2022-08-17 11:27:11 UTC
Rebased and squashed as much as I can easily squash.. hopefully that's OK.
Comment 315 Tomás Cohen Arazi 2022-08-19 17:51:05 UTC
Created attachment 139509 [details] [review]
Bug 23681: (QA follow-up) debarment_types => restriction_types

The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 316 Tomás Cohen Arazi 2022-08-19 18:17:45 UTC
Created attachment 139512 [details] [review]
Bug 23681: (QA follow-up) New schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 317 Tomás Cohen Arazi 2022-08-19 18:35:09 UTC
Ok, this is almost done. I added some required follow-ups.

But the remaining things are too much for me to take care right now, so failing it and adding my (not so big) list:

- The test files should be moved to Koha/RestrictionType*.t [MINOR]

- The tests do not cover all the things. They are also mixed. The RestrictionType.t file tests Koha::RestrictionTypes->keyed_on_code

- Koha::RestrictionTypes->keyed_on_code is not really required... and is very different than our normal return values... The fact we need to delete everything in order to test it points to some design issue (i.e. it is not a method that acts on $self as a resultset, but works in the whole table.

- keyed_on_code should be replaced by something along the lines of:

  { map { $_->{code} => $_ } $self->as_list }

- Koha::RestrictionType->make_default looks great :-D

- Koha::RestrictionType->delete has problems. We *could* accept it using plain SQL, but the logic is wrong. If the type is a system one, and exception should be thrown. The same if it is the default ;-) (i.e. it is setting itself as default (again) and then deleting itself).

As you can see, we are close to pushing this. Please hurry so no rebases are needed.
Comment 318 Martin Renvoize 2022-08-23 08:27:07 UTC
Created attachment 139649 [details] [review]
Bug 23681: Move to ::Patron::Restriction::Type(s)

This patch moves the new classes under ::Patron::Restriction:: and
enhances the Unit tests for those classes.

NOTE: We should drop keyed_on_code as part of bug 31095
Comment 319 Martin Renvoize 2022-08-23 08:31:07 UTC
OK, that last patch handles most issues outlined above with the exception of touching keyed_on_code.

I found that I'd need to write a fair bit of code to work around that implimentation and I felt it more pertinant to help quickly follow this bug by working on a cleanup in bug 31095 where I intend to drop GetDebarmentTypes and therefore the need for keyed_on_code entirely.. it'll end up much more like the Accounts code using relations properly.
Comment 320 Martin Renvoize 2022-08-24 15:23:12 UTC Comment hidden (obsolete)
Comment 321 Martin Renvoize 2022-08-25 11:36:24 UTC
Created attachment 139768 [details] [review]
Bug 23681: Add PatronRestrictionTypes syspref

This patch adds the new syspref "PatronRestrictionTypes"

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 322 Martin Renvoize 2022-08-25 11:36:31 UTC
Created attachment 139769 [details] [review]
Bug 23681: Add debarment_types table

This patch adds the table debarment_types and changes
borrower_debarments.type to be a foreign key to it

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 323 Martin Renvoize 2022-08-25 11:36:38 UTC
Created attachment 139770 [details] [review]
Bug 23681: Add modify_patron_restrictions permission

This patch adds a new "modify_patron_restrictions" permission

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 324 Martin Renvoize 2022-08-25 11:36:46 UTC
Created attachment 139771 [details] [review]
Bug 23681: Add Koha Classes

This patch adds the following objects:

Koha::RestrictionType
Koha::RestrictionTypes

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 325 Martin Renvoize 2022-08-25 11:36:54 UTC
Created attachment 139772 [details] [review]
Bug 23681: Add Management UI

This patch adds UI to allow CRUD operations on restriction types

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 326 Martin Renvoize 2022-08-25 11:37:01 UTC
Created attachment 139773 [details] [review]
Bug 23681: Allow for changes to debarments

The structure of debarments has changes slightly in that the displayed
text is now a product of a call to Koha::RestrictionTypes rather than
just the debarment's code. This patch allows for that

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 327 Martin Renvoize 2022-08-25 11:37:10 UTC
Created attachment 139774 [details] [review]
Bug 23681: Allow for selection of restriction type

This patch displays a restriction type select box (when appropriate)
when adding manual patron restrictions

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 328 Martin Renvoize 2022-08-25 11:37:18 UTC
Created attachment 139775 [details] [review]
Bug 23681: Clean up on delete

When a patron restriction type is deleted, any debarments that use that
type need to revert to the default type, this patch implements this
behaviour

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 329 Martin Renvoize 2022-08-25 11:37:26 UTC
Created attachment 139776 [details] [review]
Bug 23681: Add unit tests

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 330 Martin Renvoize 2022-08-25 11:37:33 UTC
Created attachment 139777 [details] [review]
Bug 23681: (QA follow-up) Allow for translations

This patch allows for existing translations to follow through if
debarment type descriptions are left unaltered for the default types.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 331 Martin Renvoize 2022-08-25 11:37:41 UTC
Created attachment 139778 [details] [review]
Bug 23681: Updates for bug 26703

This patch fixes the title ordering and also replaces the breadcrumbs
with the modern nav block equivilent

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 332 Martin Renvoize 2022-08-25 11:37:52 UTC
Created attachment 139779 [details] [review]
Bug 23681: (QA follow-up) Fix license, perlcritic & executable

This patch fixes the simple issues mentioned by the QA script.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 333 Martin Renvoize 2022-08-25 11:37:59 UTC
Created attachment 139780 [details] [review]
Bug 23681: (QA follow-up) Fix preferences

Add the missing `.` and switch from `yes/no` to `1/0`.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 334 Martin Renvoize 2022-08-25 11:38:07 UTC
Created attachment 139781 [details] [review]
Bug 23681: (QA follow-up) Rename columns

Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 335 Martin Renvoize 2022-08-25 11:38:15 UTC
Created attachment 139782 [details] [review]
Bug 23681: Fix QA issues

This patch fixes following QA issues:
- convert intaller files as .yml
- change column name readonly as is_system
- change column name is_system as default_value
- add column can_be_added_manually (testplan for this below)
- move syspref "PatronRestrictionTypes" to "Accounting > Features" tab
- tweak page title
- tweak tests to apply these changes

Also atomicupdate files have been updated. Issues with delete and tests
is fixed with adding additional schema change file.

To test:
1) Add new restriction type and make it manual.
2) Navigate to patron details page.
3) Add new restriction to patron.
=> Only selectable restriction should be the one
you just created.

Also prove t/db_dependent/RestrictionTypes.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 336 Martin Renvoize 2022-08-25 11:38:23 UTC
Created attachment 139783 [details] [review]
Bug 23681: DBIC Schema

To be able to delete and pass tests we need to declare
koha_object[s]_class to DebarmentType.pm. Otherwise
following error is raised:

"Can't locate object method "_new_from_dbic" via package
"Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?)
at /kohadevbox/koha/Koha/Object.pm line 237"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 337 Martin Renvoize 2022-08-25 11:38:32 UTC
Created attachment 139784 [details] [review]
Bug 23681: (QA follow-up) Move preference again

This patch removes the new PatronRestrictionTypes preference from the
accounting area in preference to creating a new group for 'Patron
restriction' related preferences in the circulation preferences tab.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 338 Martin Renvoize 2022-08-25 11:38:40 UTC
Created attachment 139785 [details] [review]
Bug 23681: (QA follow-up) Restore customisablity of description

This patch restores the customisability of description for system restriction
types. Translatability is not affected as you can translate the defaults
via template translation and assuming the end users leave their
descriptions at the default, the translations will be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 339 Martin Renvoize 2022-08-25 11:38:47 UTC
Created attachment 139786 [details] [review]
Bug 23681: (QA follow-up) Merge update files

This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 340 Martin Renvoize 2022-08-25 11:38:59 UTC
Created attachment 139787 [details] [review]
Bug 23681: (QA follow-up) Proper handling of default option

This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 341 Martin Renvoize 2022-08-25 11:39:08 UTC
Created attachment 139788 [details] [review]
Bug 23681: (follow-up) Mark fields at booleans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 342 Martin Renvoize 2022-08-25 11:39:15 UTC
Created attachment 139789 [details] [review]
Bug 23681: (QA follow-up) Add patron restrictions to admin menu

This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 343 Martin Renvoize 2022-08-25 11:39:23 UTC
Created attachment 139790 [details] [review]
Bug 23681: (QA follow-up) Remove spacing and add question mark

This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 344 Martin Renvoize 2022-08-25 11:39:30 UTC
Created attachment 139791 [details] [review]
Bug 23681: (QA follow-up) Fix memberentry page display

We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 345 Martin Renvoize 2022-08-25 11:39:37 UTC
Created attachment 139792 [details] [review]
Bug 23681: (QA follow-up) debarment_types => restriction_types

The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 346 Martin Renvoize 2022-08-25 11:39:45 UTC
Created attachment 139793 [details] [review]
Bug 23681: (QA follow-up) New schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 347 Martin Renvoize 2022-08-25 11:39:54 UTC
Created attachment 139794 [details] [review]
Bug 23681: Move to ::Patron::Restriction::Type(s)

This patch moves the new classes under ::Patron::Restriction:: and
enhances the Unit tests for those classes.

NOTE: We should drop keyed_on_code as part of bug 31095
Comment 348 Martin Renvoize 2022-08-25 11:47:01 UTC
Created attachment 139795 [details] [review]
Bug 23681: (follow-up) Re-fix ::Patron::Restriction::Type(s)
Comment 349 Tomás Cohen Arazi 2022-08-25 11:55:04 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!