Version 45 (modified by figaro, 7 years ago) (diff)

Cosmetic changes

Trac Ticket Template

Notice: This plugin is unmaintained and available for adoption.


This plugin enables users to create a ticket using templates which can be customized by the Trac administrator and the users themselves.

Key features:

  • Trac administrator can specify a general system level template default for all uncustomized ticket types.
  • System level ticket templates are ticket type specific.
  • User level ticket templates (ie, my template) can be managed by common users.

Changes in version 0.7

  • This version has full i18n support with Trac 0.12dev-r9098 and above.
  • New feature: support My Template: everyone can manage their own templates now.
  • New feature: add permission TT_USER to fine-grained control My Template.
  • New feature: template can include any fields, the default field is description.
  • New feature: support template params that can be specified by URL.
  • New feature: support importing and exporting ticket_templates (by Russell Ballestrini).

See: ZoomQuiet ~ Collection KSPEG Trac hacking.

Bugs/Feature Requests

Existing bugs and feature requests for TracTicketTemplatePlugin are here.

If you have any issues, create a new ticket.


25 / 30


6 / 11


1 / 1


Download the zipped source from here.


You can check out TracTicketTemplatePlugin from here using Subversion, or browse the source with Trac.


Important: Please backup your ticket templates if you are upgrading this plugin.

Prerequisite: Simplejson when Python is earlier than version 2.6.

You can install this software as a normal Trac plugin:

  1. Uninstall this plugin if you have installed it before.
  2. Change to the directory containing
    • (Optional): If you are using Trac 0.12 with i18n, you should compile language files here:
      python compile_catalog -f
  3. If you want to install this plugin globally, that will install this plugin to the Python path:
    • python install
  4. If you want to install this plugin to one Trac instance only:
    • python bdist_egg
    • Copy the generated egg file to the Trac instance's plugin directory:
      cp dist/*.egg /srv/trac/env/plugins
  5. Configure your trac.ini file:
    tickettemplate.* = enabled
    field_list = summary, description, reporter, owner, priority, cc, milestone, component, version, type
    enable_custom = true
    • Set field_list to choose which field should be included in template.
    • Set enable_custom to false will disable My Template, which default is true.

About i18n / l10n support

This plugin is prepared for localization. English message texts are the (POSIX) default.

Current languages supplied with the plugin are:

  • English (default)
  • Chinese (simplified)
  • Japanese
  • German
  • Italian

If you can't find the language you want, you could do it yourself.

  1. Init your language catalog, taking et_EE (Estonian) as an example:
    python init_catalog -l et_EE
  2. Update catalog:
    python update_catalog -l et_EE
  3. Translate with your favorite editor, the language file locate in tickettemplate/loclate/et_EE/LC_MESSAGES/tickettemplate.po
    • Note: this .po file should be saved with UTF-8 encoding.
  4. Update catalog again, for normalizing the manual edits:
    python update_catalog -l et_EE
  5. Generate the compiled catalog:
    python compile_catalog -f
  6. Reinstall the plugin.

See the l10n cookbook page for Trac plugins for more details.

You've done a new translation? Superb! Contributing your translation is highly appreciated.
You could send it to the plugin's maintainer or contribute to Trac plugin l10n project via Transifex:

Top translations: Trac_Plugin-L10N » tickettemplate

Kindly provided by


  • Trac administrator should define the template for all ticket types:
    • Login as administrator, open Admin -> Ticket System -> Ticket Template.
    • load the template of each ticket type, modify them and apply changes.
  • After defined ticket template, normal user can create ticket using predefined template by change ticket types dropdown list items.
Screen capture of the New Ticket page
Screen capture of the Admin panel
  • About template params:
    • This plugin supports template params which can be specified by URL. For example:
    • The template:
      foo bar %(my_param)s baz qux
    • Call newticket:
    • Rendered:
      foo bar anything baz qux
    • And owner field would be filled by myname by Trac's default convention.
    • Note: be careful choosing template param name to avoid conflicting with ticket field names.

Recent Changes

16409 by rjollos on 2017-03-26 04:34:08
1.0dev: Support SubcomponentsPlugin

Patch by

Fixes #12670.

15414 by rjollos on 2016-03-08 19:37:35
1.0dev: Fix regression in r14729

The classmethod line should have been removed.

Fixes #12700.

15102 by rjollos on 2015-12-07 17:12:05
1.0dev: Fix regression in [14129]

My Template selector was not functioning due to
execution of selector before adding the template containing
the element intended to be selected.

Refs #12603.



Author: richard
Maintainer: none (needsadoption)
Contributors: hasienda, russellballestrini, rjollos

Attachments (2)

Download all attachments as: .zip