-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable users to signup to all content by organisation #451
Conversation
This is a refactor, it wont change things for end users. The intent is to make it easier to add estimates for other content items in the future. In a commit to follow I will make it possible to estimate the weekly email volume for people and so on.
This replaces the TaxonomySignup model with a new model, ContentItemSubscriberList. End users wont see a change as a result of this commit. The intent is to make it possible to give an arbitrary content item to the ContentItemSubscriberList and have it return a subscriber list for that content item. TaxonomySignup does this just for taxons. Now we can use ContentItemSubscriberList to generate subscriber lists for people, organisations, and so on. In a future commit I will use this class to generate subscriber lists for organisations.
This lets one use /email-signup?link=/path-to-content-item to subscribe to permitted content items, rather than subscribing just to e.g. ?topic=/education. As with the past couple of commits, this is just a minor refactor, moving things around, generalising taxon to content_item. End users wont see a change as result of this commit. In a following commit I will make it possible to subscribe to organisations via this endpoint.
This will enable users to subscribe to organisations content items via the /email-signup?link=ministry-of-magic endpoint. It will behave in the same way as the topic signup does currently. Trello: https://trello.com/c/KsDrrchK/620.
This will enable users to subscribe to organisation email alerts via the EmailAlertFrontend user interface. **Note:** Should be merged after alphagov/email-alert-frontend#451 Trello: https://trello.com/c/NSJuSR4z/587.
class OrganisationWeeklyEmailVolume | ||
HIGH = '40 - 60'.freeze | ||
MEDIUM = '0 - 20'.freeze | ||
LOW = '0 - 5'.freeze |
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.
Are these numbers based on anything?
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.
It's very much a finger-in-air estimate. This is the same as our estimates for taxonomy emails (which may now be wrong).
This is the explanation in the commit (d4a97b2#diff-5c90fde72d5dd7ed3acd972c5bc07f58) where the taxonomy estimate was added:
These figures are based on analysis of historical email volume.
Perhaps we could make a request to email-alert-api to figure out the exact volume.
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.
Code looks good, but I'm a little wary about the organisation email frequency numbers. Is there some way we can check that (and update the numbers here)?
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.
We're going to return to the number estimate in the future.
This will enable users to subscribe to organisations content items via the /email-signup?link=ministry-of-magic endpoint.
It will behave in the same way as the taxonomy signup does currently.
Most of the changes are related to generalising the existing taxonomy endpoint to support all links, not just taxons.
I refactored the taxonomy code and then added in the organisations logic. It'll be easiest to review commit by commit.
Trello: https://trello.com/c/KsDrrchK/620.
Go to https://finder-frontend-pr-X.herokuapp.com/email-signup?link=hm-treasury to try it out.
Views: