Summary: | Email address shown on OpacMaintenancePage should use ReplytoDefault if set | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, fridolin.somers, jonathan.druart, tomascohen |
Version: | Main | Keywords: | Manual |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement changes the OPAC maintenance page* so that it uses the email address from the ReplyToDefault system preference, if it is set, for the "please contact the site administrator" email link.
If ReplyToDefault is not set, it will use KohaAdminEmailAddress.
If both ReplytoDefault and KohaAdminEmailAddress are not set, no link is shown.
* Displays when the OpacMaintenance system preference is set to "Show".
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Bug Depends on: | 27940 | ||
Bug Blocks: | |||
Attachments: |
Bug 28086: OpacMaintenance page should use ReplytoDefault if set
Bug 28086: OpacMaintenance page should use ReplytoDefault if set Bug 28086: OpacMaintenance page should use ReplytoDefault if set Bug 28086: OpacMaintenance page should use ReplytoDefault if set Bug 28086: OpacMaintenance page should use ReplytoDefault if set |
Description
Katrin Fischer
2021-04-04 19:31:22 UTC
Created attachment 119325 [details] [review] Bug 28086: OpacMaintenance page should use ReplytoDefault if set This patch changes the OPAC maintenance template so that it checks for a value in the ReplyToDefault system preference when displaying the "please contact the site administrator" email link. Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is defined, it won't show the link at all. To test, apply the patch and set the OpacMaintenance preference to "Show." - In the OPAC you should see the "System Maintenance" page. - Test this page with various settings: - ReplytoDefault and KohaAdminEmailAddress both populated. - Only ReplytoDefault - Only KohaAdminEmailAddress - Neither. Confirm that the correct email address is used in each case. I can't apply the patch for some reason: Applying: Bug 28086: OpacMaintenance page should use ReplytoDefault if set error: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt). error: could not build fake ancestor Patch failed at 0001 Bug 28086: OpacMaintenance page should use ReplytoDefault if set Created attachment 119561 [details] [review] Bug 28086: OpacMaintenance page should use ReplytoDefault if set This patch changes the OPAC maintenance template so that it checks for a value in the ReplyToDefault system preference when displaying the "please contact the site administrator" email link. Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is defined, it won't show the link at all. To test, apply the patch and set the OpacMaintenance preference to "Show." - In the OPAC you should see the "System Maintenance" page. - Test this page with various settings: - ReplytoDefault and KohaAdminEmailAddress both populated. - Only ReplytoDefault - Only KohaAdminEmailAddress - Neither. Confirm that the correct email address is used in each case. Created attachment 119564 [details] [review] Bug 28086: OpacMaintenance page should use ReplytoDefault if set This patch changes the OPAC maintenance template so that it checks for a value in the ReplyToDefault system preference when displaying the "please contact the site administrator" email link. Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is defined, it won't show the link at all. To test, apply the patch and set the OpacMaintenance preference to "Show." - In the OPAC you should see the "System Maintenance" page. - Test this page with various settings: - ReplytoDefault and KohaAdminEmailAddress both populated. - Only ReplytoDefault - Only KohaAdminEmailAddress - Neither. Confirm that the correct email address is used in each case. Signed-off-by: David Nind <david@davidnind.com> Created attachment 119568 [details] [review] Bug 28086: OpacMaintenance page should use ReplytoDefault if set This patch changes the OPAC maintenance template so that it checks for a value in the ReplyToDefault system preference when displaying the "please contact the site administrator" email link. Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is defined, it won't show the link at all. To test, apply the patch and set the OpacMaintenance preference to "Show." - In the OPAC you should see the "System Maintenance" page. - Test this page with various settings: - ReplytoDefault and KohaAdminEmailAddress both populated. - Only ReplytoDefault - Only KohaAdminEmailAddress - Neither. Confirm that the correct email address is used in each case. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Hum, pondering. Why the OPAC maintenance only? Why not this one as well for instance? Koha/Patron/Password/Recovery.pm: my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's branch or Koha Admin (In reply to Jonathan Druart from comment #6) > Hum, pondering. Why the OPAC maintenance only? > > Why not this one as well for instance? > Koha/Patron/Password/Recovery.pm: my $kohaEmail = $library->branchemail > || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's > branch or Koha Admin Yes please, if we have missed other cases, we should do them too. But I recommend not fixing them all in the same bug to keep things moving. Created attachment 119802 [details] [review] Bug 28086: OpacMaintenance page should use ReplytoDefault if set This patch changes the OPAC maintenance template so that it checks for a value in the ReplyToDefault system preference when displaying the "please contact the site administrator" email link. Also changed: If neither ReplytoDefault nor KohaAdminEmailAddress is defined, it won't show the link at all. To test, apply the patch and set the OpacMaintenance preference to "Show." - In the OPAC you should see the "System Maintenance" page. - Test this page with various settings: - ReplytoDefault and KohaAdminEmailAddress both populated. - Only ReplytoDefault - Only KohaAdminEmailAddress - Neither. Confirm that the correct email address is used in each case. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (In reply to Jonathan Druart from comment #6) > Hum, pondering. Why the OPAC maintenance only? > > Why not this one as well for instance? > Koha/Patron/Password/Recovery.pm: my $kohaEmail = $library->branchemail > || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's > branch or Koha Admin Pondering why this still works for us, I think something happens in sub _send_message_by_email to that. Jonathan, can you maybe verify and let me know if I should file another bug? I am not sure I understand the point of having KohaAdminEmailAddress a fallback for ReplytoDefault everywhere. In that case why do we keep KohaAdminEmailAddress? (In reply to Jonathan Druart from comment #10) > I am not sure I understand the point of having KohaAdminEmailAddress a > fallback for ReplytoDefault everywhere. In that case why do we keep > KohaAdminEmailAddress? E-mail configuration varies widely. If a library has set a reply-to you can assume they want to use it in these cases. If they have left it empty, we should use KohaAdminEmailAdress. Reply-to is mostly much needed for support companies. If you are self hosting using your own institution's mail server, you won't need it. Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x Actually more of a bugfix I think - in our case at the moment always a 'noreply@' is shown. I think we should have a new configuration for this particular use case (email address to be displayed in OPAC when some error needs to be reported). If I was to pick one, I would say the admin address is the right one, and libraries should set different values for each branch. But I see Katrin's point/need. (In reply to Tomás Cohen Arazi from comment #15) > I think we should have a new configuration for this particular use case > (email address to be displayed in OPAC when some error needs to be reported). > > If I was to pick one, I would say the admin address is the right one, and > libraries should set different values for each branch. But I see Katrin's > point/need. It's not only my need actually. I think as the reply-to address is used when you reply to emails, it makes a lot of sense to use it first. If you don't want to use it, you don't have to set it at all. I believe this is all the configuration we need here. It's optional and probably will only be set when you have a use case that requires it. |