Skip to content

Commit

Permalink
Rewrite guidance for renaming email lists
Browse files Browse the repository at this point in the history
This makes a few changes:

- Promotes the new auto-update behaviour for list titles
- Warns against updating list slugs e.g. at peak times

As a result, the guidance is now bit vague. This is intentional:

- Slugs for subscriber lists are barely visible to the user. We
should avoid causing errors for users unless there's an issue
with a legacy slug appearing in a few query params.

- We should avoid expending effort updating titles for niche
subscriber lists, as the value of doing so is inherently low -
the most-used lists will auto-update without intervention.
  • Loading branch information
Ben Thorner committed Jan 21, 2021
1 parent cc0937f commit 0ebe872
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/manual/rename-a-country.html.md
Expand Up @@ -103,15 +103,21 @@ In [Smart-answers](https://github.com/alphagov/smart-answers):

### 5. Update Email Alert API

The country's subscription list(s) `title` and `slug` needs to be updated, such as:
The country may have associated subscriber lists, such as:

* "Publications related to `<country_name>`"
* "`<country_name>` - travel advice"
* "`<country_name>`"

The titles of these lists will update automatically the next time a user tries to subscribe. You can force this to happen sooner by pretending to subscribe yourself (just to the point where you select a frequency).

Each subscriber list also has a "slug", which appears in the query params of the last few pages of the signup journey (selecting a frequency and entering an email). You can reset the slug manually as follows:

**WARNING: the slug is used as an ID for the last few pages of the signup journey (e.g. [here](https://github.com/alphagov/email-alert-frontend/blob/784009bfff734003e028e1c0ab36b61d1775a45f/app/controllers/content_item_signups_controller.rb#L33)). When you change the slug, any users currently trying to sign up on the pages will receive a 404.**

1. Run the rake task [data_migration:find_subscriber_list_by_title[title]](https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/parambuild/?TARGET_APPLICATION=email-alert-api&MACHINE_CLASS=email_alert_api&RAKE_TASK=data_migration:find_subscriber_list_by_title[country_name])
with the country name to see which subscription lists need to be updated
2. Run the rake task [data_migration:update_subscriber_list[slug,"new_title",new_slug]](https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/parambuild/?TARGET_APPLICATION=email-alert-api&MACHINE_CLASS=email_alert_api&RAKE_TASK=data_migration:update_subscriber_list[country_slug,"new_title",new_country_slug])
2. Run the rake task [data_migration:update_subscriber_list_slug[slug,new_slug]](https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/parambuild/?TARGET_APPLICATION=email-alert-api&MACHINE_CLASS=email_alert_api&RAKE_TASK=data_migration:update_subscriber_list_slug[country_slug,new_country_slug])
to update the subscription lists

### 6. Remove duplicate search results
Expand Down

0 comments on commit 0ebe872

Please sign in to comment.