Opened 5 years ago

Closed 5 years ago

#10845 closed enhancement (fixed)

Validate configuration

Reported by: ejucovy Owned by: ejucovy
Priority: normal Component: WorkflowNotificationPlugin
Severity: normal Keywords:
Cc: Trac Release:


There should be some validation of the configuration and its templates. Otherwise, an invalid configuration will mean that end users will see trac errors when the plugin is in use.

At minimum, this should verify that the configuration is well formed, and that every templated configuration value can be parsed by genshi's TextTemplate class without error.

There should be a trac-admin command to invoke this, and perhaps also a configuration option for wiring it into an environment setup participant.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by ejucovy

Resolution: fixed
Status: newclosed

The next release will include a trac-admin command that does this and prints an error message if a piece of the configuration fails to validate:

$ trac-admin /my/env/ workflow_notifications validate
Syntax error in reviewed.body
Hi $ticket.reporter,\n\nYour request has been reviewed by $ It is now assigned to ${ticket.owner}.\n\n{% if change and change.comment %}$ said:\n\n$change.comment\n\n{% end %}-----\nTicket URL: $link\n$ <${project.url or abs_href()}>\n$project.descr
TemplateSyntaxError: unexpected EOF while parsing (, line 1) (<string>, line 1)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain ejucovy.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.