dosubot[bot] commented on issue #35908: URL: https://github.com/apache/superset/issues/35908#issuecomment-3467460440
<!-- Greeting --> Hi @globaljonsey! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> The datetime substitution in the email subject for scheduled reports should be evaluated at each email send, not just when the schedule is saved. The current behavior you’re seeing—where all emails have the same datetime value—is a bug in the implementation. Superset sets the datetime once when the notification class is loaded, so every email uses that static value instead of the actual send time. The documentation and tests both expect dynamic evaluation per send, matching your expectation. You can see the technical details in the code [here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/reports/notifications/email.py) and the documented intent [here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/alerts-reports.mdx). To fix this, the code should use the current datetime at send time, not a class-level value. There isn’t a workaround or patch in recent pull requests or discussions yet. If you need to address this immediately, you’d need to update the notification logic so the datetime is generated fresh for each email send. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/28c2d048-dab6-4e11-9436-73687a4f6998?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35908) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
