Ticket #10845 (closed enhancement: fixed)

Opened 4 months ago

Last modified 3 months ago

Validate configuration

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

Description

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

Change History

02/22/13 04:59:46 changed by ejucovy

  • status changed from new to closed.
  • resolution set to fixed.

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 $change.author. It is now assigned to ${ticket.owner}.\n\n{% if change and change.comment %}$change.author said:\n\n$change.comment\n\n{% end %}-----\nTicket URL: $link\n$project.name <${project.url or abs_href()}>\n$project.descr
TemplateSyntaxError: unexpected EOF while parsing (, line 1) (<string>, line 1)

Add/Change #10845 (Validate configuration)




Change Properties
Action