provide custom fields programmatically
Note: this plugin may be rather silly. See the comments on http://trac.edgewall.org/ticket/8290"""
Description
The CustomFieldProviderPlugin provides an extension point that is used to populate custom fields programmatically. Plugins may implement the ICustomFieldProvider interface and have their custom ticket fields registered.
Bugs/Feature Requests
Existing bugs and feature requests for CustomFieldProviderPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out CustomFieldProviderPlugin from here using Subversion, or browse the source with Trac.
Example
See the SampleCustomFieldProvider in example.py for an example. Documentation on how to use the interface is in interface.py:
""" interface to programatically provide custom ticket fields """ from trac.core import Interface class ICustomFieldProvider(Interface): def fields(): """ should return a dictionary of dictionaries describing the custom fields. The primary key should be the field name. The secondary keys should be the options and the secondary values should be field values Example: { 'mycustomfield': { 'type': 'radio', 'label': 'My Custom Field', 'options': ['foo', 'bar', 'baz']} } 'type' == 'text' is assumed if not provided See http://trac.edgewall.org/wiki/TracTicketsCustomFields for defined semantics """
Recent Changes
[5526] by k0s on 04/16/09 18:55:59
add license information
[5525] by k0s on 04/16/09 18:55:10
add a link to its new home
[5524] by k0s on 04/16/09 16:42:31
* expose the Interface * give a version
[5519] by k0s on 04/14/09 17:51:03
initial import of the CustomFieldProviderPlugin
Author/Contributors
Originally developed at The Open Planning Project
Author: k0s
Contributors: