https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 210447
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210447&action=edit
Bug 43995: Fix hold fee and pickup library alerts on request.pl when patron
name is hidden

With HidePatronName set to "Don't show", the hold fee note on the Place
hold page used the patron-title.inc fallback as its subject:

  Note: A patron from library Disley Library will be charged a hold fee...

and the pickup library alert (Bug 42661) still printed the fallback for
staff who may not see the patron's details even though HidePatronName was
off. In a club hold, every member from the same library rendered as the
identical "A patron from library X", so members could not be told apart.
The alerts also had no stable id or classes for sites that want to style
or hide them.

patron-title.inc is shared by ~70 staff templates and is not changed.
In request.tt:

- Work out once whether the selected patron's name is hidden (the
  HidePatronName preference, or no permission to see patrons of that
  library, the same two conditions the include uses). The patron is still
  identified on the page by card number.
- When hidden the fee note says "This patron will be charged a hold fee
  ...". The pickup alert drops the "Patron: ..." part, now also for staff
  who cannot see the patron.
- In a club hold, show each member's card number instead of the
  fallback when HidePatronName is on. Names stay hidden. With names shown
  the list is unchanged.
- Add id="pickup_library_mismatch" and class="pickup-library-mismatch"
  to the pickup alert, class="patron-identifier" around the patron and
  class="patron-home-library" around the library, in both the single
  patron alert and the club member list.

To test:
1. Create a patron whose home library differs from your logged in
   library, and set a hold fee (Administration > Circulation and fine
   rules: Hold fee = 1.30 for all libraries, patron categories and item
   types). Set HoldFeeMode to "any time a hold is collected"
2. Set HidePatronName to "Don't show"
3. Go to /cgi-bin/koha/reserve/request.pl?biblionumber=<biblio with items>
   and search for that patron's card number
   => Before: "Note: A patron from library X will be charged a hold fee
      of 1.30 when they collect this item"
   => After: "Note: This patron will be charged a hold fee of 1.30 when
      they collect this item"
   => The pickup alert reads "Pickup library is different. Patron's home
      library: X / CODE"
4. Set HidePatronName to "Show"; reload
   => The fee note and the pickup alert show the patron's name as before,
      and the pickup alert has a full stop after the name
5. Inspect the page: the pickup alert <li> has id
   "pickup_library_mismatch"; the spans carry the classes
   patron-identifier and patron-home-library
6. Use a patron from your own library
   => No pickup alert. The fee note still shows
7. Set the hold fee to 0
   => No fee note
8. Log in as a staff user without "view borrower infos from any
   libraries" (with IndependentBranches on) and repeat 3 with
   HidePatronName on "Show"
   => The fee note and pickup alert do not show the patron's name
9. Create a club with members from two or more libraries, with at least
   two from the same library, and place a club hold from
   request.pl?biblionumber=<id>&club=<club id>&findclub=<name>
   => With HidePatronName on "Don't show", each member is listed by card
      number and the members of one library can be told apart. With
      "Show" the list is unchanged

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to