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

New Subject Prefix Input Box #720

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

LaVibeX
Copy link
Contributor

@LaVibeX LaVibeX commented Jan 31, 2024

Description

  • Email Subject Prefix is Hardcoded rightnow .subject("[Dependency-Track] " + notification.getTitle()),
  • This is a solution to allow the User to modify the Subject Prefix to its will .subject(smtpPrefix + " " + notification.getTitle() )

This modification would be available in Administration>Configuration>Email
and "[Dependency-Track]" would be the first default value.

If the User change the Subject Prefix, it will need to press Update button in order to save the changes.
Subject Prefix is not a required field so leaving the input box in blank is also an option.

This new feature helps to distinguish between several instances of Dependency-Track, e.g. prod and qual systems.

Default value: [Dependency-Track]

image

Modified Value: [Dependency-Track TEST ®]

image

Modified Value: " "

image

This PR depends on its corresponding PR in the server repository
DependencyTrack/dependency-track#3422

Addressed Issue

This fixes DependencyTrack/dependency-track#1823

Additional Details

Check this.emailPrefix == "undefined", so at the moment of update it save " " value

        if (typeof this.emailPrefix == "undefined") {
          this.updateConfigProperty("email","smtp.prefix", " ");
        }

This PR is supervised by @lukas-braune.

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

Signed-off-by: Andres Tito andres.tito@rohde-schwarz.com

Add new Subject Prefix Input box in Configuration>Email

Following same code style for adding new input box.

Clean undifined value to " " when user choose not to have
Subject Prefix

Signed-off-by: Andres Tito <andres.tito@rohde-schwarz.com>
The prefix is not really tied to the SMTP protocol.
If other email delivery methods are added in the future,
the prefix might still be valid to use, but should not be called smtp.prefix

Signed-off-by: Andres Tito <andres.tito@rohde-schwarz.com>
@nscuro nscuro added the enhancement New feature or request label Feb 4, 2024
@nscuro nscuro added this to the 4.11 milestone Feb 4, 2024
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.

Thanks!

@nscuro nscuro merged commit 2d38950 into DependencyTrack:master Feb 5, 2024
9 checks passed
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.

Notifications subjects - add additional information (e.g. Project/Component/Severity) into Subject string
2 participants