Modify

#10845 closed enhancement (fixed)

Validate configuration

Reported by: ejucovy Owned by: 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 (0)

Change History (1)

comment:1 Changed 22 months ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed

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 Comment

Modify Ticket

Action
as closed The owner will remain ejucovy.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.