onegov-cloud icon indicating copy to clipboard operation
onegov-cloud copied to clipboard

Feature/ogc 1725 news subscribe for categories

Open Tschuppi81 opened this issue 1 year ago • 4 comments

Newsletter: Support for newsletter category definition and subscription

An organization can define newsletter categories. Subscribing users can select their categories of interest and will only receive newsletters that report on at least one of their subscribed categories.

TYPE: Feature LINK: ogc-1725

Checklist

  • [x] I have performed a self-review of my code
  • [x] I considered adding a reviewer
  • [x] I have updated the PO files
  • [x] I made changes/features for both org and town6
  • [x] I have added tests for my changes/features

Tschuppi81 avatar Aug 16 '24 12:08 Tschuppi81

Codecov Report

Attention: Patch coverage is 88.63636% with 15 lines in your changes missing coverage. Please review.

Project coverage is 89.48%. Comparing base (b1cb2d8) to head (743c970). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/onegov/org/forms/settings.py 65.90% 15 Missing :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
src/onegov/newsletter/collection.py 100.00% <ø> (ø)
src/onegov/newsletter/models.py 98.83% <100.00%> (+0.02%) :arrow_up:
src/onegov/org/forms/newsletter.py 87.28% <100.00%> (+0.78%) :arrow_up:
src/onegov/org/forms/signup.py 100.00% <100.00%> (ø)
src/onegov/org/layout.py 91.52% <100.00%> (+0.03%) :arrow_up:
src/onegov/org/models/organisation.py 97.95% <100.00%> (+0.01%) :arrow_up:
src/onegov/org/utils.py 85.55% <100.00%> (+0.51%) :arrow_up:
src/onegov/org/views/newsletter.py 96.71% <100.00%> (+0.48%) :arrow_up:
src/onegov/town6/views/newsletter.py 100.00% <100.00%> (ø)
src/onegov/org/forms/settings.py 80.36% <65.90%> (-1.60%) :arrow_down:

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b1cb2d8...743c970. Read the comment docs.

codecov[bot] avatar Aug 16 '24 12:08 codecov[bot]

more information on how to use the categories, it's not clear to me where they can be created.

In /newsletter-settings you can define the categories as yaml list, an example is provided

Tschuppi81 avatar Aug 22 '24 05:08 Tschuppi81

Open items after review:

  • [x] Initial newsletter subscription: success message with categories
  • [x] Initial newsletter subscription: email confirmation with categories
  • [x] newsletter subscription email with update link
  • [x] newsletter subscription redirect to /home or /news
  • [x] prepare own view to 'edit newsletter subscription'
  • [x] remove edit bar for send view

Tschuppi81 avatar Aug 22 '24 08:08 Tschuppi81

@BreathingFlesh Would we need a navigation back to /newsletters once we are in /newsletters/update? What do you think? image

Tschuppi81 avatar Aug 23 '24 05:08 Tschuppi81