Skip to content

feat: per-event title_template and body_template in content options #97

@gregoryfoster

Description

@gregoryfoster

Summary

The per-event overrides accordion (#90) allows customising additive content options (diff, domain, significance, etc.) per event type. However, title_template and body_template Jinja2 strings are only available at the default level — they cannot be set per event type through the UI or form parser.

A user who wants a custom Jinja2 title for change_detected events but the default title for watch_error events has no path to do this.

Scope

  • Extend _parse_content_config_from_form() to read content_config__override__{et}__title_template and content_config__override__{et}__body_template textarea inputs
  • Add textarea inputs to each per-event accordion row in notification_content_options.html
  • Add tests for round-trip

Notes

  • No backend changes needed — ContentOptions.title_template / body_template already exist and resolve_options() already applies per-event overrides
  • render_template() and build_template_context() are already called with the per-event resolved options in notify.py
  • Pure UI + form-parsing work, same pattern as feat: per-event-type content options UI accordion #90

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions