[[PageOutline(2-5,Contents,pullout)]] = Create customisable ticket templates == Description 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. See also TicketStencilPlugin and KeepInterfaceSimplePlugin for plugins with similar functionality. === 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 specified in `[tickettemplate] field_list`. Just set the fields to the desired values when creating a template from the //New Ticket// page. * New feature: support template params that can be specified by URL. * New feature: support importing and exporting ticket_templates (by Russell Ballestrini). * 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. '''The New Ticket page''' [[Image(NewTicketPage-v0.7.png, border=2)]] '''The Admin panel''' [[Image(AdminTicketTemplatePage-v0.7.png, border=2)]] About template parameters: * This plugin supports template parameters which can be specified by URL. For example: * The template: {{{ foo bar %(my_param)s baz qux }}} * Call newticket: {{{ http://yourtrac/newticket?my_param=anything&owner=myname }}} * Rendered: {{{ foo bar anything baz qux }}} * And the owner field would be populated with myname by Trac's default convention. * '''Note''': be careful choosing the template parameter name to avoid conflicts with existing ticket field names. See: '''ZoomQuiet''' ~ Collection KSPEG Trac hacking. == Bugs/Feature Requests Existing bugs and feature requests for TracTicketTemplatePlugin are [report:9?COMPONENT=TracTicketTemplatePlugin here]. If you have any issues, create a [/newticket?component=TracTicketTemplatePlugin new ticket]. [[TicketQuery(component=TracTicketTemplatePlugin&group=type,format=progress)]] == Download Download the zipped source from [export:tractickettemplateplugin here]. == Source You can check out TracTicketTemplatePlugin from [/svn/tractickettemplateplugin here] using Subversion, or [source:tractickettemplateplugin browse the source] with Trac. == Installation '''Important''': Please backup your ticket templates if you are upgrading this plugin. Prerequisite: [pypi:simplejson 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. 1. Change to the directory containing `setup.py`. * (Optional): If you are using Trac 0.12 with i18n, you should compile language files here: {{{#!sh python setup.py compile_catalog -f }}} 1. If you want to install this plugin globally, this will install this plugin to the Python path: * `python setup.py install` 1. If you want to install this plugin to one Trac instance only: * `python setup.py bdist_egg` * Copy the generated egg file to the Trac instance's plugins directory: {{{#!sh cp dist/*.egg /srv/trac/env/plugins }}} 1. Configure your `trac.ini` file: {{{#!ini [components] tickettemplate.* = enabled [tickettemplate] 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, of which the default value 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: {{{#!sh python setup.py init_catalog -l et_EE }}} 1. Update catalog: {{{#!sh python setup.py update_catalog -l et_EE }}} 1. 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. 1. Update catalog again, for normalizing the manual edits: {{{#!sh python setup.py update_catalog -l et_EE }}} 1. Generate the compiled catalog: {{{#!sh python setup.py compile_catalog -f }}} 1. Reinstall the plugin. See the [t:wiki:CookBook/PluginL10N#Dotranslatorswork l10n cookbook page for Trac plugins] for more details. You've done a new translation? Superb! Contributing your translation is highly appreciated.[[BR]] You could send it to the plugin's maintainer or contribute to [TracPluginTranslation Trac plugin l10n project] via [http://www.transifex.net/projects/p/Trac_Plugin-L10N/ Transifex]: Top translations: Trac_Plugin-L10N ยป [https://www.transifex.com/projects/p/Trac_Plugin-L10N/resource/tickettemplate tickettemplate][[BR]] [[Image(https://www.transifex.com/projects/p/Trac_Plugin-L10N/resource/tickettemplate/chart/image_png, title="Go to Trac_Plugin-L10N project page on Transifex.net", link=https://www.transifex.com/projects/p/Trac_Plugin-L10N/resource/tickettemplate)]] Kindly provided by [[Image(https://ds0k0en9abmn1.cloudfront.net/static/charts/images/tx-logo-micro.png, link=http://www.transifex.net/, title=the open translation platform, valign=bottom)]] == Recent Changes [[ChangeLog(tractickettemplateplugin, 3)]] == Author/Contributors '''Author:''' [wiki:richard] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' [wiki:hasienda], [wiki:russellballestrini], rjollos