Bug 41132 - Add the variable 'branch' to the PASSWORD_RESET and STAFF_PASSWORD_RESET notices
Summary: Add the variable 'branch' to the PASSWORD_RESET and STAFF_PASSWORD_RESET notices
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Marion Durand
QA Contact: Laura Escamilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-29 15:45 UTC by Marion Durand
Modified: 2025-12-22 13:44 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
The variable for a patron's home library 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>>
Version(s) released in:
Circulation function:


Attachments
Bug 41132: make 'branch' available in password reset notification (2.06 KB, patch)
2025-10-29 16:21 UTC, Marion Durand
Details | Diff | Splinter Review
Bug 41132: Make 'branch' available in password reset notification (2.11 KB, patch)
2025-12-22 04:17 UTC, David Nind
Details | Diff | Splinter Review
Bug 41132: Make 'branch' available in password reset notification (2.18 KB, patch)
2025-12-22 13:44 UTC, Laura Escamilla
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marion Durand 2025-10-29 15:45:54 UTC
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).
Comment 1 Marion Durand 2025-10-29 16:21:12 UTC
Created attachment 188564 [details] [review]
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.
Comment 2 Katrin Fischer 2025-12-03 13:41:32 UTC
Just a note: borrowers doesn't work either :)
Comment 3 David Nind 2025-12-22 04:17:33 UTC
Created attachment 190657 [details] [review]
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>
Comment 4 David Nind 2025-12-22 04:25:01 UTC
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.
Comment 5 Laura Escamilla 2025-12-22 13:44:34 UTC
Created attachment 190665 [details] [review]
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>