-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add document collection ids to the links payload for email alert api #577
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is needed to support alphagov/email-alert-api#1803 When a user signs up to alerts on a document collection, research has shown an expectation of being notified when changes are made to documents within that collection. The message that publishing API puts onto rabbit contains the expanded links (see eg here https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/305143/console) but email alert service only forwards some of this to Email Alert API: - To support topic taxonomy based emails, this application creates a custom `taxon_tree` attribute populated from content_ids in the taxon attribute of expanded links. - Following that pattern, this commit adds a document collection attribute, populated with content ids plucked from the document collection attribute of expanded links
hannako
changed the title
Add document collection id's to the links payload for email alert api
Add document collection ids to the links payload for email alert api
Nov 14, 2022
hannako
added a commit
to alphagov/email-alert-api
that referenced
this pull request
Nov 14, 2022
When a user signs up to alerts on a document collection, research has shown an expectation of being notified when changes are made to documents within that collection. The relationship between a document collection and the documents it contains is stored in the links attribute sent to this application by email alert service. See [1] The current logic that matches subscriber lists to a content change matches on content ID AND tags or links. This code was added in [2] when we began supporting single page email notifications. I've followed that pattern here. eg if the ContentChange has tags as well as a content id, the SubscriberListQuery will only match it to a subscriber list if it matches on the tags AND the content ID. In the case of a user being subscribed to a single page AND a collection that includes that page, they will recieve two emails. [1] alphagov/email-alert-service#577 [2] 069ef4e
hannako
added a commit
to alphagov/email-alert-api
that referenced
this pull request
Nov 14, 2022
When a user signs up to alerts on a document collection, research has shown an expectation of being notified when changes are made to documents within that collection. The relationship between a document collection and the documents it contains is stored in the links attribute sent to this application by email alert service. See [1] The current logic that matches subscriber lists to a content change matches on content ID AND tags or links. This code was added in [2] when we began supporting single page email notifications. I've followed that pattern here. eg if the ContentChange has tags as well as a content id, the SubscriberListQuery will only match it to a subscriber list if it matches on the tags AND the content ID. In the case of a user being subscribed to a single page AND a collection that includes that page, they will recieve two emails. [1] alphagov/email-alert-service#577 [2] 069ef4e
KludgeKML
approved these changes
Nov 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
chao-xian
approved these changes
Nov 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has been superseded by #583 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is needed to support
alphagov/email-alert-api#1803
When a user signs up to alerts on a document collection, research has shown an
expectation of being notified when changes are made to documents within that collection.
The message that publishing API puts onto rabbit contains the expanded links (see eg here
https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/305143/console) but
email alert service only forwards some of this to Email Alert API:
taxon_tree
attribute populated from content_ids in the taxon attribute of expanded links.
with content ids plucked from the document collection attribute of expanded links
Trello card: https://trello.com/c/tJvdhfdd/1455-support-topic-like-subscriptions-for-document-collections-email-alert-api-s