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

feat(alert/report): Added optional CC and BCC fields for email notifi… #29088

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nsivarajan
Copy link

@nsivarajan nsivarajan commented Jun 5, 2024

SUMMARY

Addition of an option to provide cc and bcc list for email notifications along with email validation under Alerts and Reports.

SAMPLE SCREENSHOT

image

TESTING INSTRUCTIONS

  • Open Superset in browser > Click on the "Settings" menu on top right > Click on "Alerts & Reports"
  • Create a new alert/report or edit an existing alert/report. Enter the required details.
  • Select "Email" as the preferred notification method.
  • Enter valid/invalid email ids in the To field, CC and BCC fields and hit add/save to test the feature.

CONTRIBUTORS

nsivarajan, episkey24

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@nsivarajan nsivarajan marked this pull request as ready for review June 5, 2024 10:53
@dosubot dosubot bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label Jun 5, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 24 lines in your changes missing coverage. Please review.

Project coverage is 70.36%. Comparing base (76d897e) to head (3f5a3fc).
Report is 353 commits behind head on master.

Files Patch % Lines
.../features/alerts/components/NotificationMethod.tsx 31.81% 12 Missing and 3 partials ⚠️
...-frontend/src/features/alerts/AlertReportModal.tsx 57.14% 3 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #29088      +/-   ##
==========================================
+ Coverage   60.48%   70.36%   +9.87%     
==========================================
  Files        1931     1956      +25     
  Lines       76236    78422    +2186     
  Branches     8568     8960     +392     
==========================================
+ Hits        46114    55178    +9064     
+ Misses      28017    21043    -6974     
- Partials     2105     2201      +96     
Flag Coverage Δ
hive 48.90% <44.44%> (-0.26%) ⬇️
javascript 58.00% <44.18%> (+0.29%) ⬆️
mysql 77.29% <100.00%> (?)
postgres 77.40% <100.00%> (?)
presto 53.51% <44.44%> (-0.30%) ⬇️
python 83.75% <100.00%> (+20.26%) ⬆️
sqlite 76.86% <100.00%> (?)
unit 59.20% <44.44%> (+1.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nytai
Copy link
Member

nytai commented Jun 6, 2024

@nsivarajan can you please describe why this features is useful and what problem it's solving? I'm not sure it's clear why having someone cc'd on the notification email would be any different than just adding directly to the recipients list. For BCC I can see a use case where someone would silently like to know if the report is delivered as expected, but are there any others?

Please address the failing checks and add some unit/integration tests for this functionality

@nsivarajan
Copy link
Author

@nytai Thanks for raising these points. In our use of Superset's alerts and reports feature, TO recipients receive actionable items, CC recipients—including leadership, hierarchical levels, and cross-functional teams—benefit from increased visibility into the communication without being directly responsible for action, while BCC recipients discreetly monitor email delivery and processes.

I've addressed the failing checks and added test cases,Could you please assist with triggering the workflow/checks again?

@villebro villebro requested a review from kasiazjc June 18, 2024 18:31
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Code LGTM. However, given all the design work on this modal lately, it'd be nice to get @kasiazjc feedback on the new elements. One thing I believe I've seen elsewhere is CC and BCC are text/button like objects, and they expand into an input field when clicked, so as to save real estate when not needed.

@nsivarajan
Copy link
Author

nsivarajan commented Jun 23, 2024

@kasiazjc Could you please assist with the review of this PR when you have a moment? Your feedback would be greatly appreciated.

@eschutho
Copy link
Member

eschutho commented Jun 23, 2024

@nsivarajan curious if you're looking for cc/bcc for each report, or if you want the same cc/bcc list for all reports. If it's the latter, there's a recent feature that would allow you to add cc to all emails. We could also add a bcc there.

@nsivarajan
Copy link
Author

@eschutho Thanks for checking. Each report will have its own configurable CC and BCC recipients, allowing for specific recipients to be designated as needed.

For example, the Sales dashboard will have its own CC and BCC recipients, and similarly, the Manufacturing dashboard will have its own CC and BCC recipients. This approach provides flexibility and ensures that the appropriate people are included for each report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert-reports Namespace | Anything related to the Alert & Reports feature size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants