Skip to content
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

Grouped email notifications #10838

Merged
merged 11 commits into from
Jan 9, 2025
Merged

Conversation

bastianbeier
Copy link
Contributor

@bastianbeier bastianbeier commented Jan 8, 2025

Description

Allow grouping of multiple events in a single email.
Needs to be merged after #10838

Related Issue

#10793

Motivation and Context

How Has This Been Tested?

  • test environment: localhost
  • test case 1: Test if grouped email can be sent successful (trigger multiple events, run cli command, check mailbox)

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link

update-docs bot commented Jan 8, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@bastianbeier
Copy link
Contributor Author

bastianbeier commented Jan 8, 2025

TODO:

  • tests
  • documentation

@bastianbeier bastianbeier marked this pull request as draft January 8, 2025 19:00
&cli.BoolFlag{
Name: "weekly",
Aliases: []string{"w"},
Usage: "Sends grouped weekly email notifications.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does weekly mean in this context? I'd expect notifications with a creation date within the "last 7 days" / last 168 hours!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

daily and weekly are just groups. You can trigger the sending of a group using the notifications send-email --daily or notifications send-email --weekly cli command.
You could also trigger the weekly job every 4 days or every 8 days but you have to consider the TTL of the events in the store when triggering not that often.

services/notifications/pkg/service/job.go Outdated Show resolved Hide resolved
services/notifications/pkg/service/persistence.go Outdated Show resolved Hide resolved
@bastianbeier bastianbeier changed the title Issue 10793 Grouped email notifications Jan 9, 2025
@bastianbeier bastianbeier self-assigned this Jan 9, 2025
@bastianbeier bastianbeier marked this pull request as ready for review January 9, 2025 12:11
@kobergj
Copy link
Collaborator

kobergj commented Jan 9, 2025

@bastianbeier @2403905 do we consider the sonarcloud warnings false positives?

@bastianbeier bastianbeier enabled auto-merge January 9, 2025 17:08
@bastianbeier bastianbeier merged commit 1cd64a1 into owncloud:master Jan 9, 2025
3 checks passed
ownclouders pushed a commit that referenced this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants