oncall-engine/engine/common/jinja_templater
jorgeav dba6748efd
Add datetimeparse Jinja2 template helper filter function (#4312)
# What this PR does
Jinja2 filter to parse strings into datetime objects. Previously, only a
limited set of strings could be parsed into datetime objects
([datetime_re](https://docs.djangoproject.com/en/2.2/_modules/django/utils/dateparse/)).

The addition of this filter allows for strings of any format to be
converted into datetime.

## Which issue(s) this PR closes


<!--
*Note*: if you have more than one GitHub issue that this PR closes, be
sure to preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2024-05-13 17:16:38 +00:00
..
__init__.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
apply_jinja_template.py Support prescribed labels (#3848) 2024-02-20 14:42:51 +08:00
filters.py Add datetimeparse Jinja2 template helper filter function (#4312) 2024-05-13 17:16:38 +00:00
jinja_template_env.py Add datetimeparse Jinja2 template helper filter function (#4312) 2024-05-13 17:16:38 +00:00