mattermost-plugin-playbooks
mattermost-plugin-playbooks copied to clipboard
[MM-42886] Introduce weekly digest
Summary
Introduces a weekly digest, similar to the daily one. Extracted functions that decide whether a daily/weekly digest should be sent. Currently users would receive weekly digest if the daily digest is enabled.
What's left:
- [x] Introduce a enable/disable weekly digest flag
- [x] The above flag should default to the current daily digest setting ~- [ ] Add a feature flag, as this is a user-facing feature and includes refactoring~ ~- [ ] Add more tests for corner cases around sending daily/weekly digests~
Ticket Link
Checklist
- [x] Telemetry updated
- [x] Gated by experimental feature flag
- [x] Unit tests updated
Hello @batebobo,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.
Hey @batebobo! I'd love to have @crspeller take a look at this review -- should we wait until it leaves draft status?
Hi @lieut-data! Yesterday I re-requested a review from @mkraft and GitHub automatically removed @crspeller :( I'd also like one more person to review the task!
No worries! That's weird behaviour on GitHub's part -- fixed :)
Thanks for re-requesting @Phrynobatrachus! I didn't mean to remove you, but rather to re-request review from @crspeller :(
No worries, it's a Github bug I've seen a few times recently.
Hey @Phrynobatrachus! Thanks for the comment and the screenshots! It seems that the timestamp is from a while ago (~30 years), so it definitely doesn't make sense to receive a daily digest. I'll take a look and let you know
Hey again @Phrynobatrachus! There was still code left to change with regard to the difference between daily digest, weekly digest and /playbook todo. I pushsed the necessary changes and tested it with the following cases:
- Didn't send any digest because of no data to show
- /playbook todo still showed everything (even with 0s all around)
- Added 5 playbooks and 1 run with tasks assigned to me. Weekly digest was sent (all sections, even the ones with 0s)
- Daily digest was sent (not showing the 0 overdue tasks)
- /playbook todo still works with all the data
Let me know if anything else comes up :)
Apologies for the delay, once we sort out
https://github.com/mattermost/mattermost-plugin-playbooks/pull/1509#discussion_r1016979222
this should be good, everything else appears to be working after the updates.
Hi @Phrynobatrachus! Thanks for the feedback! I'll check the case with the daily/weekly flags later today and let you know :)
It looks like another pull request won the migration race for the name 0.61.