Koha-clms/opac
PhilipOrr 9516fe517c
Bug 39498: Correct patron restrictions displays
This patch updates the way patron restrictions are displayed in the OPAC
and staff interface, with the intention of making the details of each
restriction more clear. In the OPAC, a new include file is created to be
reused on the holds page and the user summary page. opac-user.pl is
updated to allow a parameter to be passed to automatically open the
"Overdues" tab.

Test plan:
1. Before applying the patch, check how the display is currently. First
   set syspref PatronRestrictionTypes to "Allow"
2. Add two different new restriction types, fill out both "Code" and
   "Label"
3. Go to a patron's checkout page and add one of each of these
   restrictions, but do not fill out the comment field when adding them!
4. Observe that in the checkouts page and details page of the patron, it
   just says "Restricted since..." and does not show the restriction
   types.
5. Add another restriction, this time fill out the comment field
6. Observe that now in checkout and detail pages, the labels from the
   restriction types are listed and the comment shown.
7. Apply patch
8. Go to patron's details and checkout pages and check the restrictions
   are now displayed correctly, that is the text "with the explanation"
   is only shown for the restrictions that actually have a comment
   8b. Log in to the OPAC with that patron and check they are displayed
       correctly in their summary page and when the patron is trying to
       place a hold.
9. Go to a different patron's account and add a restriction without a
   comment
10. Check it is now displayed correctly
11. Add more restrictions and check they are displayed correctly. Also
    add an OVERDUES restriction:
    11a. Find a patron with an overdue item checked out (or create an
         overdue checkout on a patron's account)
    11b. Go to Tools -> Overdue notice/status triggers
    11c. Set up a rule for that patron's category, e.g. "First" ->
         Delay: 1, make sure to mark the check box for "Restrict" and
         "Print"
    11d. Run misc/cronjobs/overdue_notices.pl
    11e. That patron should now also have an OVERDUES restriction
12. Turn PatronRestrictionTypes off again and check the patrons if
    everything is still displayed correctly
13. Go to another different patron and add a restriction with no
    comment, check if it is displayed correctly
14. Add another restriction with a comment and check it is displayed
    correctly
15. Log in to the OPAC with the patron that had OVERDUES restriction and
    check they are displayed correctly in their summary page and when
    the patron is trying to place a hold.
16. Same thing for the other patron without the OVERDUES restriction.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-26 11:10:05 -06:00
..
clubs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
errors Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
external/overdrive Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sci Bug 36586: Define self-checkin timer using Javascript class 2025-05-08 07:59:09 +02:00
sco Bug 36586: Define self-checkin timer using Javascript class 2025-05-08 07:59:09 +02:00
svc Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
ilsdi.pl Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
maintenance.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
oai.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-ISBDdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-03-06 13:54:28 +01:00
opac-MARCdetail.pl Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
opac-account-pay-return.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-account-pay.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-account.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-addbybiblionumber.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-alert-subscribe.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-alert-subscriptions.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-article-request-cancel.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-authorities-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-authoritiesdetail.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-basket.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-blocked.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-browse.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-browser.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-changelanguage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-course-details.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-course-reserves.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-curbside-pickups.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-detail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-03-06 13:54:28 +01:00
opac-discharge.pl Bug 14250: (QA follow-up) Small changes 2025-04-22 08:46:26 +02:00
opac-dismiss-message.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-downloadcart.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-downloadshelf.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-export.pl Bug 39485: Fix wide character in print-warn in opac-export 2025-04-23 09:35:13 +02:00
opac-holdshistory.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-ics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-idref.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-illrequests-unauthenticated.pl Bug 36197: (QA follow-up): Adopt POST REDIRECT GET pattern 2025-04-25 08:47:11 +02:00
opac-illrequests.pl Bug 38441: ILLHistoryCheck: OPAC 2025-04-28 18:51:36 +02:00
opac-image.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-imageviewer.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-issue-note.pl Bug 36112: Port default CHECKOUT_NOTE notice to TT 2025-02-19 17:05:35 +01:00
opac-library.pl Bug 32051: Rename Library to Contact for one public library 2025-03-07 18:02:55 +01:00
opac-main.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-memberentry.pl Bug 38974: Fix error in OPAC patron update 2025-06-06 09:41:18 -06:00
opac-messaging.pl Bug 30301: Update templates 2025-05-19 18:54:30 +02:00
opac-modrequest-suspend.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-modrequest.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-mymessages.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-news-rss.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-overdrive-search.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-page.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-passwd.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-password-recovery.pl Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
opac-patron-consent.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-patron-image.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-privacy.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-ratings.pl Bug 39319: Fixes for Pod::Checker 2025-04-14 08:51:21 +02:00
opac-readingrecord.pl Bug 18798: Use Koha.Preference in OPAC Reading Record 2025-03-19 11:55:30 +01:00
opac-recall.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-recalls.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-registration-verify.pl Bug 39737: Obsolete call on system preference 'PatronSelfRegistrationAdditionalInstructions' 2025-05-12 18:31:22 +02:00
opac-renew.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-reportproblem.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-request-article.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-reserve.pl Bug 40101: Make opac-reserve.pl use `$patron->can_place_holds()` 2025-06-26 11:10:03 -06:00
opac-reset-password.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-restrictedpage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-retrieve-file.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-review.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-routing-lists.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-search-history.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-search.pl Bug 39736: Remove obsolete call on system preference 'OPACResultsSidebar' 2025-05-12 18:31:22 +02:00
opac-sendbasket.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-sendshelf.pl Bug 39374: Add feature to block sending of lists from OPAC 2025-04-22 08:46:39 +02:00
opac-serial-issues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-shareshelf.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-shelves.pl Bug 39148: Correct sort by publicationdate in OPAC lists 2025-05-12 18:31:23 +02:00
opac-showmarc.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-showreviews.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-suggestions.pl Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
opac-tags.pl Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
opac-tags_subject.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-topissues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac-user.pl Bug 39498: Correct patron restrictions displays 2025-06-26 11:10:05 -06:00
opac-virtual-card.pl Bug 26777: Allow ability to select diffferent barcode types 2024-08-26 17:39:36 +02:00
tracklinks.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
unapi Bug 17600: Fix opac/unapi 2021-11-22 11:04:51 +01:00