Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This plugin was written to allow you to choose, based on the ticket type, which fields Trac will show or hide. For example, for the task tickets you can show only the fields: cc, component, version or any custom field you have.

More than that, you can choose which of the shown fields are required when submitting a ticket (creating ot changing).


To configure this plugin you have do add a new section in trac.ini like this:

[conditional-fields] ticket_type_N = visible_fields_N = required_fields_N =

ticket_type_N: Is the string that represents the type of the ticket.

visible_fields_N: Comma separated list of field names. Be careful to not use the field label, use always the field name. Fields that you cannot use: type, summary, owner and severity (this will be implemented soon =) )

required_fields_N: Comma separated list of tickets that are required when submitting a ticket. The required fields are highlighted in red.

The N in the options is a sequential number. For each type of ticket you will have 3 new options in trac.ini, like: ticket_type_1, visible_fields_1, required_fields_1, ticket_type_2, visible_fields_2, required_fields_2, ..., ticket_type_N, visible_fields_N, required_fields_N.

Remember that the N starts with 1, not 0.

Enabling the plugin

There are two ways to enable this plugin.

  1. You can just install it, go to the Trac Admin panel/Plugins and check all the components of this plugins as "enabled"
  2. You can edit your trac.ini by hand and add the following lines inside the [components] section.
    conditionalfields.conditionalfields.* = enabled
    conditionalfields.conditionalfields.validation = enabled


Dalton Barreto