anatoly techtonik wrote: > I am trying to add a new field to a Ticket edit form with a plugin. It > should be one .py file that doesn't require any configuration. That's > why I've decided to skip custom ticket fields approach and build > plugin from scratch.
You could still use custom fields without needing to edit trac.ini, by
defining configuration options for the desired entries in
[ticket-custom] and setting their default values to the desired values.
For example, if you want to have the following custom field:
[ticket-custom]
field = text
field.label = My field
field.value = A default value
Then you could define the following options in a Component:
field = Option('ticket-custom', 'field', 'text')
field_label = Option('ticket-custom', 'field.label', 'My field')
field_value = Option('ticket-custom', 'field.value',
'A default value')
The default values will get picked up as part of the configuration.
-- Remy
signature.asc
Description: OpenPGP digital signature
