Repository navigation
fix: improve email notification subject - #3729
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the domain retrieval logic for email notification subjects to properly read from the correct configuration file. The previous implementation incorrectly used ConfigFactory.load() which reads from application.conf, but the domain configuration is stored in user-system.conf.
- Replaced
ConfigFactory.load()withUserSystemConfig.appDomainfor proper configuration access - Updated email subject formatting to use square brackets around the domain name
- Ensured consistent domain inclusion across all email notification types
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
bobbai00
left a comment
There was a problem hiding this comment.
Tested on the staging server, works well. Left minor comments
|
@aicam Please also review this PR as you reviewed the earlier, related PR. |
aicam
left a comment
There was a problem hiding this comment.
LGTM, just address the comments
|
The change looks good to me. @aicam also tested it in a production server and it worked well. |
**Description:** This PR fixes the previous implementation of enriching email subjects apache#3548 that aims to add the domain name in email subjects. **Problem:** The previous implementation used `ConfigFactory.load()` which reads from `application.conf` by default, but the `user-sys.domain` configuration is defined in `user-system.conf`, causing the domain retrieval to always fail and return empty strings. Documentation: https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html **Solution:** Replaced the incorrect domain retrieval with `UserSystemConfig` which properly reads from `user-system.conf`. Closes apache#3720 **Email Subject Updates:** ``` "New Account Request Pending Approval" -> "New Account Request Pending Approval for [server-name]" "Account Request Received" -> "Account Request Received for [server-name]" "Your Role Has Been Updated" -> "Your Role Has Been Updated for [server-name]" ``` **Example:** <img width="1484" height="710" alt="Screenshot 2025-09-11 at 2 16 26 PM" src="https://github.com/user-attachments/assets/21f4d9cd-8642-407c-914d-51c91d6858bd" /> --------- Co-authored-by: Seongjin Yoon <[email protected]> Co-authored-by: Seongjin Yoon <[email protected]>
**Description:** This PR fixes the previous implementation of enriching email subjects apache#3548 that aims to add the domain name in email subjects. **Problem:** The previous implementation used `ConfigFactory.load()` which reads from `application.conf` by default, but the `user-sys.domain` configuration is defined in `user-system.conf`, causing the domain retrieval to always fail and return empty strings. Documentation: https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html **Solution:** Replaced the incorrect domain retrieval with `UserSystemConfig` which properly reads from `user-system.conf`. Closes apache#3720 **Email Subject Updates:** ``` "New Account Request Pending Approval" -> "New Account Request Pending Approval for [server-name]" "Account Request Received" -> "Account Request Received for [server-name]" "Your Role Has Been Updated" -> "Your Role Has Been Updated for [server-name]" ``` **Example:** <img width="1484" height="710" alt="Screenshot 2025-09-11 at 2 16 26 PM" src="https://github.com/user-attachments/assets/21f4d9cd-8642-407c-914d-51c91d6858bd" /> --------- Co-authored-by: Seongjin Yoon <[email protected]> Co-authored-by: Seongjin Yoon <[email protected]>
Description:
This PR fixes the previous implementation of enriching email subjects #3548 that aims to add the domain name in email subjects.
Problem:
The previous implementation used
ConfigFactory.load()which reads fromapplication.confby default, but theuser-sys.domainconfiguration is defined inuser-system.conf, causing the domain retrieval to always fail and return empty strings.Documentation: https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html
Solution:
Replaced the incorrect domain retrieval with
UserSystemConfigwhich properly reads fromuser-system.conf.Closes #3720
Email Subject Updates:
Example:
