openlibhums / openlibhums/janeway

Move journal name appended to emails to templates

Open
#3,045 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Describe the bug
The journal name is appended to transactional emails right before they go out, rather than as part of the editable email templates.

https://github.com/BirkbeckCTP/janeway/blob/dce0e97c65671575ca77f75ea05fbad0430aa34a/src/utils/notify_plugins/notify_email.py#L23

This means:

  1. It is not visible when composing an email, so the user might think they need to put the journal name in their email signature or in the body of the email, which would then be redundant information
  2. It cannot be changed by the user in edge cases not anticipated by us
  3. It makes testing emails a bit more difficult

This is a small thing, almost insignificant in itself, but for consistency with the rest of the email writing interface, it merits a change. In general we want to allow users to anticipate system behaviour and have reasonable control over it--especially when it is an email sent in their name. So, eventually, we want to make this part of the email template.

In addition to removing the line in notify_email above, this would involve a migration that adds {{ journal.name }} to templates as appropriate.

Janeway version
1.4.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/utils/notify_plugins/notify_email.py at the linked line, then identify the transactional email templates that currently receive the appended journal name. Review the migration patterns used for template changes and update the relevant templates so the journal name is editable there; done means the runtime append is removed and those templates include {{ journal.name }}.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.