dependency-track
dependency-track copied to clipboard
Notifications subjects - add additional information (e.g. Project/Component/Severity) into Subject string
Current Behavior:
The notification email's subject are hard coded right now.
Proposed Behavior:
add the notification subject configuration to the notification template and use same params as there exists for content.
Current Behavior:
The notification email's subject are hard coded now and contain the project name (twice) only. E.g.: "New Vulnerability Identified on Project: [[PROJECTID]: [PROJECTID] : [VERSION]]"
Proposed Behavior: add the notification subject configuration to the notification template in order to add all necessary information E.g.: {{ notification.title }}
{% if notification.group == "NEW_VULNERABILITY" %} Email Subject: {{alert.name}}: {{ subject.component.project.name }}: {{ subject.component.project.version }}: {{ subject.component.toString }} {{ subject.component.version.toString }} {{ subject.vulnerability.severity }} Vulnerability ID: {{ subject.vulnerability.vulnId }} Vulnerability URL: {{ baseUrl }}/vulnerability/?source={{ subject.vulnerability.source }}&vulnId={{ subject.vulnerability.vulnId }} Severity: {{ subject.vulnerability.severity }} Source: {{ subject.vulnerability.source }} Component: {{ subject.component.toString }} Component URL: {{ baseUrl }}/component/?uuid={{ subject.component.uuid }} Project: {{ subject.component.project.name }} Version: {{ subject.component.project.version }} Description: {{ subject.component.project.description }} Project URL: {{ baseUrl }}/projects/{{ subject.component.project.uuid }} {% if notification.subject.affectedProjects|length > 1%}
This issue was originally raised in discussion #1811
Customizable Notification Templates were introduced in v4.6 (released October 11 2022, since this enhancement was logged) but support only customization of body... with subject still being hard-coded as of v4.7.1
According to syalioune:
My previous answer still apply. While v4.6.0 introduced customization features, it was for the notification body content. The notification title, thus email subject, is unfortunately still hardcoded. Enhancement request #1823 is still valid.
@JN-CSIRT, I know this enhancement request is still valid.. that is why I have assigned it a priority and a milestone.
Hi Mark, thanks a lot!
Would be great to have also possibility to put severity in e-mail subject (well any field really). Subject is very important for mail automation rules as mentioned in the discussions.
Reopening because the original ask was for supporting templating.