Skip to content

Conversation

@ch8matt
Copy link
Contributor

@ch8matt ch8matt commented Nov 7, 2025

Adds the NotificationRule's level (e.g. [WARNING], [ERROR]) to the subject of outgoing SMTP emails. Improves clarity and urgency of notifications received by users. Uses ctx.ruleLevel() for formatting.

Description

Adds the notification level (e.g., [WARNING], [ERROR], [INFORMATIONAL]) to the subject line of outgoing SMTP notification emails. This improves visibility and urgency of alerts directly from the subject without needing to open the email.

Addressed Issue

Additional Details

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@owasp-dt-bot
Copy link

owasp-dt-bot commented Nov 7, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production
Copy link

codacy-production bot commented Nov 7, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (fa1eb0b) 24093 19492 80.90%
Head commit (c78b93b) 24098 (+5) 19497 (+5) 80.91% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5503) 6 6 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

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

It seems you accidentally modified a Dependabot commit here, can you please resolve that? Otherwise LGTM.

@nscuro nscuro added the enhancement New feature or request label Nov 13, 2025
@nscuro nscuro added this to the 4.14.0 milestone Nov 13, 2025
Adds the NotificationRule's level (e.g. [WARNING], [ERROR]) to the subject
of outgoing SMTP emails. Improves clarity and urgency of notifications
received by users. Uses ctx.ruleLevel() for formatting.

Signed-off-by: ch8matt <[email protected]>
@lukas-braune
Copy link
Contributor

"INFORMATIONAL" can be interpreted as "no action required" by organizations. Please consider allowing this feature to be disabled.

@ch8matt
Copy link
Contributor Author

ch8matt commented Nov 14, 2025

DependencyTrack/frontend#1379

@ch8matt
Copy link
Contributor Author

ch8matt commented Nov 14, 2025

A new toggle, disabled by default, has been added to enable the feature.

@ch8matt ch8matt requested a review from nscuro November 18, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants