Skip to content

Jinja2 'now' tag works for notifications, but cannot be saved #3426

@mwt

Description

@mwt

Describe the bug
The 'now' jinja tag for generating dates does work with notifications, but cannot be saved. When you try to save a notification with this tag, I get the following error:

This is not a valid Jinja2 template: Encountered unknown tag 'now'.

Version

v0.50.13

How did you install?

Docker

To Reproduce

Steps to reproduce the behavior:

  1. Go to Settings -> Notifications (or any monitor's notification settings)
  2. Include a now tag in the notification title or body (e.g., {% now 'America/New_York', '%Y-%m-%d' %})
  3. Test the notification. This will work fine and the notification will send the correct date.
  4. Save. This will fail and you will get the error.

! ALWAYS INCLUDE AN EXAMPLE URL WHERE IT IS POSSIBLE TO RE-CREATE THE ISSUE - USE THE 'SHARE WATCH' FEATURE AND PASTE IN THE SHARE-LINK! Sorry, I do not have a publicly accessible instance.

Expected behavior
I expect to be able to save it.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Ubuntu 24.04
  • Browser Firefox
  • Version 142

Additional context
Changedetection.io blog post where this tag is supported in another context.

Metadata

Metadata

Assignees

Labels

Notifications systemsDevelopment of notifications of changesbugSomething isn't workingtriage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions