[Bug 43995] New: Hold fee and pickup alerts on request.pl read badly when patron name is hidden
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Bug ID: 43995 Summary: Hold fee and pickup alerts on request.pl read badly when patron name is hidden Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Target Milestone: --- With HidePatronName set to "Don't show", the alerts on the staff Place hold page (reserve/request.pl) read badly because they use the patron-title.inc fallback "A patron from library X" as if it were a patron name: - Hold fee note (Bug 40769): "Note: A patron from library Disley Library will be charged a hold fee of 1.30 when they collect this item" - Pickup library alert: Bug 42661 removed the repeated library name when HidePatronName is on, but staff who are not allowed to see that patron's details (for example no view_borrower_infos_from_any_libraries with IndependentBranches) still get "Patron: A patron from library X Patron's home library: X / CODE", as noted in comment 4 of Bug 42661. - Club holds: every member from the same library is listed as the identical "A patron from library X", so the members cannot be told apart. - None of the alerts has a stable id or class, so sites that want to restyle or hide them with CSS have nothing to target. Only a single selected patron can produce the fee note and the pickup alert (they depend on borrowernumber in request.pl); club holds render one pickup line per member. patron-title.inc is used by about 70 staff templates, so the fix stays local to request.tt: - Work out once whether the patron's name is hidden (HidePatronName, or no permission to see patrons of that library). The patron is still identified on the page by card number. - Fee note: "This patron will be charged a hold fee..." when hidden. - Pickup alert: leave out the "Patron: ..." part when hidden. - Club members: show the card number instead of the fallback when HidePatronName is on, so members can be told apart without showing names. - Add id="pickup_library_mismatch" and classes pickup-library-mismatch, patron-identifier and patron-home-library. Test plan: 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). Set HoldFeeMode to "any time a hold is collected" 2. Set HidePatronName to "Don't show" 3. Go to reserve/request.pl?biblionumber=<biblio with items> and search for that patron's card number Before: "A patron from library X will be charged a hold fee..." After: "This patron will be charged a hold fee..." 4. Set HidePatronName to "Show": names are shown as before 5. Use a patron from your own library: no pickup alert. Set the fee to 0: no fee note 6. As a staff user without view_borrower_infos_from_any_libraries and IndependentBranches on, names are not shown even with HidePatronName on "Show" 7. Place a club hold for a club with several members from the same library with HidePatronName on: members are listed by card number 8. Inspect the page for the new id and classes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- 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 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Depends on| |42661 Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42661 [Bug 42661] Redudant repetition in "Patron: %s Patron's home library: (%s /%s )" when HidePatronName is activated -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Martin Renvoize (ashimema) from comment #1)
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"
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
I have a staff user from CPL without "view borrower infos from any libraries." When logged in as them and attempting to place a hold, a search by cardnumber for a patron from MPL returns no users so hold placement cannot proceed and I never see either the hold fee message or the pickup location message. I think it is correct/expected that my CPL staff account not be able to find an MPL patron to place a hold? Setting this to FQA, though the issue may be confusion within the test plan or within me, rather than anything in the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210447|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211755 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211755&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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- (In reply to Andrew Fuerste Henry from comment #2) Thanks Andrew, you are right: the problem was the test plan, not the patch. The patron search on request.pl only finds patrons the staff user may see, so it never gets as far as the fee note or pickup alert for a patron from another library. request.pl itself loads the patron with a plain lookup when it is given findborrower (or borrowernumber) in the URL, so step 8 now opens the page directly: reserve/request.pl?biblionumber=<id>&findborrower=<cardnumber>. I ran that in KTD with a CPL staff user (IndependentBranches on, no view_borrower_infos_from_any_libraries) and an MPL patron: the fee note reads 'This patron will be charged a hold fee of 1.30...', the pickup alert has no patron name, and the name appears nowhere on the page. The same patron as a staff user from MPL shows the name as before. The code is unchanged; only the test plan in the commit message is revised. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211755|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211885|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43995 --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 212450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212450&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> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org