Skip to content

Update issuable assignment change email copy

What does this MR do and why?

Indicate what users have been added as assignees and what users have been removed, rather than giving a full set of previous assignees and a full set of new assignees and leaving it to the user to determine what changed.

Includes updates to gitlab.pot with new base English strings and adjustments to tests in notify_spec.rb.

Screenshots

in the images below, the same change has been made to assignees in both the Before and After screenshot.

Scenario Before After
First assignee is added to an issue or MR Screenshot 2023-12-08 at 16.16.33.png image.png
One user added as assignee on issue or MR Screenshot 2023-12-08 at 16.18.24.png image.png
One user removed as assignee on issue or MR, but one or more assignees remain image.png image.png
Multiple users added as assignees on issue or MR image.png image.png
Multiple users remove as assignees on issue or MR, but 1 or more assignees remain Screenshot 2023-12-08 at 16.18.54.png image.png
One or more users added and one or more users removed as assignees on issue or MR image.png image.png
all users removed as assignees on issue or MR Screenshot 2023-12-08 at 16.17.00.png image.png

How to set up and validate locally

  1. Check out this branch locally and gdk restart
  2. Navigate to an issue or an MR
  3. In a separate browser window or tab, navigate to /rails/letter_opener (for most devs, http://gdk.test:3000/rails/letter_opener)
    1. This will let you observe system notification emails generated by user activity in your GDK
  4. On the issue or MR, change the assignees, then in the letter_opener window, check the resulting system notification email
    1. ADDING assignees
      1. Whenever 1 user is added as an assignee, the text should say $NAME was added as an assignee.
      2. Whenever 2 users are added as assignees, the text should say $NAME_1 and $NAME_2 were added as assignees.
      3. Whenever 3+ users are added as assignees, the text should say $NAME_1, $NAME_2, .... and $NAME_n were added as assignees.
    2. REMOVING assignees
      1. Whenever 1 user is removed as an assignee but at least one assignee remains, the text should say $NAME was removed as an assignee.
      2. Whenever 2 users are removed as assignees but at least one assignee remains, the text should say $NAME_1 and $NAME_2 were removed as assignees.
      3. Whenever 3+ users are removed as assignees but at least one assignee remains, the text should say $NAME_1, $NAME_2, .... and $NAME_n were removed as assignees.
      4. If the last assignee is removed, the text should say All assignees were removed.
    3. ADDING AND REMOVING at the same time
      1. The appropriate combination of an added message and a removed message from the options above should both appear in the email. For example, if 1 assignee is added and two are removed, then there will be two paragraphs. The first will say $NAME_1 was added as an assignee. The second will say $NAME_2 and $NAME_3 were removed as assignees.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #211470 (closed)

Edited by Chad Lavimoniere

Merge request reports

Loading