https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 211885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211885&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. Create a staff user from a different library to the patron's (e.g. CPL, with the circulate, catalogue and "place holds" permissions but without "view borrower infos from any libraries"), and turn IndependentBranches on. Leave HidePatronName on "Show" Searching for the patron on request.pl correctly finds nothing for this user, so open the page directly instead: /cgi-bin/koha/reserve/request.pl?biblionumber=<biblio with items>&findborrower=<card number of the patron from the other library> => The fee note reads "This patron will be charged a hold fee..." and the pickup alert does not name the patron. Before the patch both showed the "A patron from library X" fallback as if it were a name Repeat as a staff user from the patron's own library => The patron's name is shown 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 <noreply@anthropic.com> Signed-off-by: Michelle Spinney <mspinney@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.