[Bug 41132] New: variable 'branch' is not available in PASSWORD_RESET nor STAFF_PASSWORD_RESET
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Bug ID: 41132 Summary: variable 'branch' is not available in PASSWORD_RESET nor STAFF_PASSWORD_RESET Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: marion.durand@biblibre.com QA Contact: testopia@bugs.koha-community.org The variable 'branch' (in TT) or 'branches' (in <<>>) is not available in notification PASSWORD_RESET and STAFF_PASSWORD_RESET. It would be useful to be able to display the library name or email (for example, in the signature(?) of the email). -- 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=41132 Marion Durand <marion.durand@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=41132 --- Comment #1 from Marion Durand <marion.durand@biblibre.com> --- Created attachment 188564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188564&action=edit Bug 41132: make 'branch' available in password reset notification The variable 'branch' in TemplateToolkit (or 'branches' in hungry aligator syntax) is now available in notification for password reset (PASSWORD_RESET an STAFF_PASSWORD_RESET). The branch of the patron will be used. To test: 1- Edit the template for PASSWORD_RESET and STAFF_PASSWORD_RESET to add <<branches.branchname>> and [% branch.branchname %] 2- Make sure syspref OpacResetPassword to allowed to be able to reset the password from OPAC and staff interface 3- Generate both notices a- In the staff interface, go to the patron record, click "More" then "Send password reset" b- In the OPAC, Click on "Forgot your password?" and enter the email (or cardnumber) (you might need to click "Get new password recovery link") 4- Check the notices, from the patron record go to the notices tab, make sure that the branch name is not displayed (black) 5- Apply the patch 6- Repeate step 3 and check the notices, the branch name is now displayed Note: if using KTD email will not be sent and on the OPAC side you have an error message telling that the email was not send. This is not a problem for our testing as we can check the notices from the interface. -- 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=41132 Marion Durand <marion.durand@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |marion.durand@biblibre.com |ity.org | -- 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=41132 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Just a note: borrowers doesn't work either :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 David Nind <david@davidnind.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=41132 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 190657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190657&action=edit Bug 41132: Make 'branch' available in password reset notification The variable 'branch' in TemplateToolkit (or 'branches' in hungry aligator syntax) is now available in notification for password reset (PASSWORD_RESET an STAFF_PASSWORD_RESET). The branch of the patron will be used. To test: 1- Edit the template for PASSWORD_RESET and STAFF_PASSWORD_RESET to add <<branches.branchname>> and [% branch.branchname %] 2- Make sure syspref OpacResetPassword to allowed to be able to reset the password from OPAC and staff interface 3- Generate both notices a- In the staff interface, go to the patron record, click "More" then "Send password reset" b- In the OPAC, Click on "Forgot your password?" and enter the email (or cardnumber) (you might need to click "Get new password recovery link") 4- Check the notices, from the patron record go to the notices tab, make sure that the branch name is not displayed (black) 5- Apply the patch 6- Repeate step 3 and check the notices, the branch name is now displayed Note: if using KTD email will not be sent and on the OPAC side you have an error message telling that the email was not send. This is not a problem for our testing as we can check the notices from the interface. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Attachment #188564|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=41132 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|variable 'branch' is not |Add the variable 'branch' |available in PASSWORD_RESET |to the PASSWORD_RESET and |nor STAFF_PASSWORD_RESET |STAFF_PASSWORD_RESET | |notices Text to go in the| |A patron's home library release notes| |variable is now available | |for use in the | |PASSWORD_RESET and | |STAFF_PASSWORD_RESET | |notices. | | | |Example: | |- Template Toolkit format: | |[% branch.branchname %] | |- Old 'alligator' style | |format: | |<<branches.branchname>> --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Even though you don't have to have email configured to test this bug, you do need to add an email address to the patron's account so that you can see the notices, for example: test@example.com. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|A patron's home library |The variable for a patron's release notes|variable is now available |home library is now |for use in the |available for use in the |PASSWORD_RESET and |PASSWORD_RESET and |STAFF_PASSWORD_RESET |STAFF_PASSWORD_RESET |notices. |notices. | | |Example: |Example: |- Template Toolkit format: |- Template Toolkit format: |[% branch.branchname %] |[% branch.branchname %] |- Old 'alligator' style |- Old 'alligator' style |format: |format: |<<branches.branchname>> |<<branches.branchname>> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Laura Escamilla <Laura.escamilla@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=41132 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190657|0 |1 is obsolete| | --- Comment #5 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 190665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190665&action=edit Bug 41132: Make 'branch' available in password reset notification The variable 'branch' in TemplateToolkit (or 'branches' in hungry aligator syntax) is now available in notification for password reset (PASSWORD_RESET an STAFF_PASSWORD_RESET). The branch of the patron will be used. To test: 1- Edit the template for PASSWORD_RESET and STAFF_PASSWORD_RESET to add <<branches.branchname>> and [% branch.branchname %] 2- Make sure syspref OpacResetPassword to allowed to be able to reset the password from OPAC and staff interface 3- Generate both notices a- In the staff interface, go to the patron record, click "More" then "Send password reset" b- In the OPAC, Click on "Forgot your password?" and enter the email (or cardnumber) (you might need to click "Get new password recovery link") 4- Check the notices, from the patron record go to the notices tab, make sure that the branch name is not displayed (black) 5- Apply the patch 6- Repeate step 3 and check the notices, the branch name is now displayed Note: if using KTD email will not be sent and on the OPAC side you have an error message telling that the email was not send. This is not a problem for our testing as we can check the notices from the interface. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com QA Contact|testopia@bugs.koha-communit |Laura.escamilla@bywatersolu |y.org |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Passed QA |Failed QA --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- The sample notices should now be updated to include this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Jake Deery <jake.deery@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190665|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=41132 --- Comment #7 from Jake Deery <jake.deery@openfifth.co.uk> --- Created attachment 193002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193002&action=edit Bug 41132: Add branch and borrower to PASSWORD_RESET This patch adds sanitised borrower - and branch - objects to the PASSWORD_RESET email template. This allows TemplateToolkit access, as well as richer logic options for branches that want greater email customisation. Prior to testing (k.t.d): a) enter k.t.d with: ktd --shell b) sudo apt update && sudo apt install dialog -y c) sudo apt install exim4 -y d) sudo dpkg-reconfigure exim4-config *) press enter to accept all defaults To test: == APPLY PATCH == a) reset_all b) on the staff client, go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET c) under email, inspect the notice. see how it is now a tt notice, with borrower and branch attributes d) go to /cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=51 e) under contact information, edit the primary email to be: root@localhost - save f) go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacResetPassword&ok=Search *) set OpacResetPassword to allowed g) on the opac, go to /cgi-bin/koha/opac-password-recovery.pl *) remember to log out *) enter 42 as the cardnumber, root@localhost as the email - submit h) on the staff client, go to /cgi-bin/koha/members/notices.pl?borrowernumber=51 *) remember to log back in *) click the most recent koha password recovery notice i) observe how the notice contains the borrower's name, userid, as well as the branch name and (data-dependent) email address j) go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET k) edit the notice text, and add [% borrower.password %] at the end l) repeat steps g-h, possibly needing to additionally click get new password recovery link m) observe how the notice is unchanged from step i), and the password is not exposed == SIGN OFF == -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Jake Deery <jake.deery@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |jake.deery@openfifth.co.uk --- Comment #8 from Jake Deery <jake.deery@openfifth.co.uk> --- Hi all, Sorry to hijack, and feel free to obsolete my patch if it is unwarranted, but I thought I'd expand this patch a little to also include sanitised borrower data! Also included an improved sample notice, that uses TemplateToolkit instead of the angry alligators. Ta, Jake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@openfifth.co | |.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 David Nind <david@davidnind.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=41132 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193002|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=41132 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 193284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193284&action=edit Bug 41132: Add branch and borrower to PASSWORD_RESET This patch adds sanitised borrower - and branch - objects to the PASSWORD_RESET email template. This allows TemplateToolkit access, as well as richer logic options for branches that want greater email customisation. Prior to testing (k.t.d): a) enter k.t.d with: ktd --shell b) sudo apt update && sudo apt install dialog -y c) sudo apt install exim4 -y d) sudo dpkg-reconfigure exim4-config *) press enter to accept all defaults To test: == APPLY PATCH == a) reset_all b) on the staff client, go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET c) under email, inspect the notice. see how it is now a tt notice, with borrower and branch attributes d) go to /cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=51 e) under contact information, edit the primary email to be: root@localhost - save f) go to /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacResetPassword&ok=Search *) set OpacResetPassword to allowed g) on the opac, go to /cgi-bin/koha/opac-password-recovery.pl *) remember to log out *) enter 42 as the cardnumber, root@localhost as the email - submit h) on the staff client, go to /cgi-bin/koha/members/notices.pl?borrowernumber=51 *) remember to log back in *) click the most recent koha password recovery notice i) observe how the notice contains the borrower's name, userid, as well as the branch name and (data-dependent) email address j) go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET k) edit the notice text, and add [% borrower.password %] at the end l) repeat steps g-h, possibly needing to additionally click get new password recovery link m) observe how the notice is unchanged from step i), and the password is not exposed == SIGN OFF == Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|The variable for a patron's |This adds sanitised release notes|home library is now |borrower and branch objects |available for use in the |to the PASSWORD_RESET email |PASSWORD_RESET and |template. |STAFF_PASSWORD_RESET | |notices. |This allows TemplateToolkit | |access, as well as richer |Example: |logic options for branches |- Template Toolkit format: |that want greater email |[% branch.branchname %] |customization. |- Old 'alligator' style | |format: |For new installs, the |<<branches.branchname>> |PASSWORD_RESET is rewritten | |to use Template Toolkit | |syntax. --- Comment #10 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. To test sending emails I added an SMTP server using a Google account and App Password: 1.1 Set up an App password for your Google Account 1.2 Configure a new 'SMTP Server' under 'Administration > SMTP servers' using the following settings, where `User name` = your Google email address and `Password` = your APP password, not your Google account password 1.3 Set this server as default Host: smtp.gmail.com Port: 587 Timeout: 5 SSL: STARTTLS User name: GOOGLEACCOUNTUSER Password: GOOGLEAPPPASSWORD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 --- Comment #11 from David Nind <david@davidnind.com> --- Does the STAFF_PASSWORD_RESET notice need updating as well? Or should the title be changed so that it only mentions the PASSOWRD_RESET notice? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Jackie U <jackie.usher@westsussex.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jackie.usher@westsussex.gov | |.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|Laura.escamilla@bywatersolu |m.de.rooy@rijksmuseum.nl |tions.com | Status|Signed Off |Failed QA --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + tables => { branches => $borrower->branchcode }, + objects => { borrower => $user }, Why use objects here and not just pass borrowers => $borrower->id or so in tables? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We just ran into this again in 24.11 - The problem is still present. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36254 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36254 [Bug 36254] Port default PASSWORD_RESET and STAFF_PASSWORD_RESET notices to Template Toolkit syntax -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132 Fiona Borthwick <fiona.borthwick@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fiona.borthwick@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org