Closed Bug 841426 Opened 13 years ago Closed 13 years ago

[basket] Should have a method to return the full list of newsletters.

Categories

(www.mozilla.org :: Bedrock, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmac, Assigned: dpoirier)

References

Details

(Whiteboard: u=developer c=basket p=2)

We're currently maintaining the list of all newsletters in multiple places. It'd be much better if the information could be queried at a central source for truth.
Whiteboard: u=developer c=basket p=2
Assignee: pmac → dpoirier
Blocks: 852285
Along with this update we're moving the newsletters list into the database, and allowing a welcome message to be specified per newsletter. So when a request comes in to subscribe to multiple newsletters what should we do? Send all the various welcome messages, or just the one for the first newsletter in the list? I think this will be an uncommon situation as the big newsletter management form will avoid sending welcome emails at all, but the API does still allow it. What do you think Jess?
Flags: needinfo?(jdavis)
Commits pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/7555cfd2cd4aba280005da35cd360f3a15fcba3c Store newsletter data in basket - Add database models to store information about newsletters, e.g. name, description, whether active, supported languages, etc. - Add an API call to fetch that information. Bug 841426 https://github.com/mozilla/basket/commit/531b3e35195b08e889d92d8c76a61a8834e35582 Merge pull request #22 from dpoirier/store-newsletter-data Bug 841426: Store newsletter data in basket
I can't imagine a place on the website where someone could subscribe to more than one newsletter at once...(especially since we're getting rid of the newsletter/new page) - other than the /existing page, but we shouldn't trigger any welcome messages from the /existing page. If someone goes to one newsletter form, directly to another one, and then to another one, we should send individual welcome email newsletters as the forms dictate. They submitted their name multiple times, so we send them an email for each time they hit submit. Does this help?
Flags: needinfo?(jdavis)
It does help, but not completely. While it seems to be true at the moment that multiple lists aren't used at once, that's no guarantee that it won't ever be that way. The main issue is that the API allows multiple signups, so we still need to handle the situation. We can disable welcome messages automatically if the request for subscription is for more than one list. Or we can send the welcome for only the first in the list. We do need to decide something though, because it could happen.
Commit pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/f4f13bca0b1f56c05aff8c1e2ab9a527854076b2 Remove non-existent newsletters from fixture - Remove newsletters from fixture if they're not in ET - Show the vendor_id in the admin so we notice next time if we have newsletters without vendor IDs. Bug 841426
Commit pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/1385f8c02b5a93fe25ed6df6b27a624296e7fa9e Clear newsletter cache on delete When we delete newsletters, we need to clear the newsletter cache. Use the post_delete signal. Bug 841426 # Branch: (no branch)
(In reply to Paul McLanahan [:pmac] from comment #4) > It does help, but not completely. While it seems to be true at the moment > that multiple lists aren't used at once, that's no guarantee that it won't > ever be that way. The main issue is that the API allows multiple signups, so > we still need to handle the situation. We can disable welcome messages > automatically if the request for subscription is for more than one list. Or > we can send the welcome for only the first in the list. We do need to decide > something though, because it could happen. You're totally right. I think the Beta & Aurora newsletter signup pages let you signup for 3 newsletters at once: https://www.mozilla.org/en-US/firefox/beta/ When this happens, I'm thinking for now (until I can think through a better solution that's maybe more fancy), we should trigger the default EN "39" general welcome email. A better solution in the future would be to trigger dyanmic content in the welcome email to list out the newsletters they just subscribed to - but I'm unsure how to make this work 100%. I'll work on the dynamic piece and put in a new ID soon that uses the content from 39 as a placeholder until I get the dynamic piece working. How does that sound?
(In reply to Jessilyn Davis from comment #7) Great! Thanks.
Commit pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/b297f67535f30cf02465d65efc0fadfe78f48d0c Send different welcome messages for newsletters - if the API specified a particular welcome, send that (not used yet) - else, if they subscribe to more than one newsletter, just send the default welcome - else, send the newsletter's own custom welcome message Bug 829278, 841426 # Branch: (no branch)
please forgive my denseness and curiosity, what's the difference between: - if the API specified a particular welcome, send that (not used yet) and - send the newsletter's own custom welcome message
It's now possible for a caller of the basket API to specify a different welcome message explicitly, overriding whatever would be used otherwise, but Bedrock doesn't do that. I added that before we moved all the newsletter information from Bedrock to Basket. We don't need it now, but I thought it might be useful so didn't bother removing it. We certainly could.
Commits pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/b7d9cc48f993a7b52ba3580b42d16d9feadccc50 Bug 841426: represent English as 'en' not 'en-US' https://github.com/mozilla/basket/commit/f7bece52990d5a71b6e968c4284fdffd5c560125 Merge pull request #28 from dpoirier/english-as-en Bug 841426: represent English as 'en' not 'en-US'
Hey Dan - I could be off in assuming what this means, but with this change, can we make sure that people that go to /en-US/ are properly rerouted to /en/? I want to avoid any broken link possibilities and we have many hard-coded /en-US/ links roaming around. (In reply to [github robot] from comment #13) > Commits pushed to master at https://github.com/mozilla/basket > > https://github.com/mozilla/basket/commit/ > b7d9cc48f993a7b52ba3580b42d16d9feadccc50 > Bug 841426: represent English as 'en' not 'en-US' > > https://github.com/mozilla/basket/commit/ > f7bece52990d5a71b6e968c4284fdffd5c560125 > Merge pull request #28 from dpoirier/english-as-en > > Bug 841426: represent English as 'en' not 'en-US'
Jess: This is just for what we send to ET. Currently ET likes to recieve 2 letter language info. And the forms we use allow them to select a language use 'en' for english. When there's a country field, it uses the 2nd half of the locale ('US'). No links to anything should change.
Commit pushed to master at https://github.com/mozilla/basket https://github.com/mozilla/basket/commit/c0246da86090a876e2626bb9c6a7fb6b5c2ad90c Use default cache Instead of requiring configuration of a separate cache for the newsletter data, use the default cache. Bug 841426
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.