0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/utils/fixtures
Simon Backx 6b3a657f88
Renamed newsletter_id and email_recipient_filter options (#14798)
refs https://github.com/TryGhost/Team/issues/1596

- Renamed `newsletter_id` to `newsletter` option, the `newsletter` option expects a slug instead of an id
- Renamed `email_recipient_filter` to `email_segment` option
- Default `email_segment` to `all`. Ignored if no newsletter is set
- `email_segment` is ignored if no newsletter is set
- When reverting a post to a draft, both `newsletter` and `email_segment` are reset to their default values (null, all)
- Removed legacy mapping from old email_recipient_filter values 'paid' and 'free' (already a migration in place)
- Dropped legacy throwing errors when email_recipient_filter is paid or free in transformEmailRecipientFilter
- Reorganized transformEmailRecipientFilter parameters for the now required newsletter parameter
- Fixed an issue where the newsletter filter wasn't working because it wasn't in permittedoptions
- Fixed an issue where you could send to an archived newsletter
- Added an extra protection when scheduling to an active, and later archiving the newsletter
- Dropped support for `send_email_when_published` in API
- When importing posts we currently don't have a system in place to set the newsletter_id to map the `send_email_when_published` behaviour. Since this was already the case, I won't include a fix in this PR.
- Stripped `email_recipient_filter`/`email_segment` from Content API (https://ghost.slack.com/archives/C02G9E68C/p1652363211841359?thread_ts=1650623650.233229&cid=C02G9E68C)
- Updated `admin-api-schema` to 3.2.0, which includes the new email_segment property
- Contains a temporary fix for https://github.com/TryGhost/Team/issues/1626, where the `.related('newsletter').fetch` call fails when the newsletter relation is already loaded, because of the overridden `formatOnWrite` method.

Since the `email_recipient_filter` is no longer used without a newsletter, the `none` value is no longer used. A migration transforms all those values to `all`. This should be safe, because we only send an email now when newsletter_id is not null (scheduled posts should already have a newsletter_id, even if at the time of scheduling they didn't add the newsletter_id option, because at that time, we defaulted to the default newsletter).

Admin changes to make this work: https://github.com/TryGhost/Admin/pull/2380
2022-05-16 10:18:04 +02:00
..
admin-views Fixed ETag header for admin templates not changing between versions (#13680) 2021-10-22 14:25:58 +01:00
config
csv Added Members bulk actions endpoint 2021-08-23 16:38:21 +02:00
data
export Fixed typo "in" default About page. (#13271) 2021-10-04 12:18:15 +01:00
filter-param Removed use of author_id syntax in fixtures 2022-05-09 20:43:19 +08:00
images Added webp image support (#13105) 2021-07-02 09:37:54 +01:00
import 🐛 Fixed uppercase file extensions ignored in content import (#14268) 2022-03-11 09:17:58 +01:00
media Added audio upload support to Media API 2021-11-09 16:39:33 +04:00
settings
themes 🔥 Removed legacy product + price helpers from themes 2022-05-12 18:58:01 +01:00
urls Updated urls/resources cache fixtures 2021-11-22 21:56:32 +13:00
cache-rules.js
context.js
data-generator.js Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
default-settings.json Removed settings that are no longer in use (#14802) 2022-05-13 21:19:21 +01:00
fixtures.json Added permissions for Authors to read labels 2022-05-12 16:07:05 +01:00
test.hbs