|Version 5 (modified by 6 years ago) (diff),|
Default and convert report dynamic variables to pulldowns
Notice: This plugin is unmaintained and available for adoption.
This plugin applies to all reports that use dynamic variables. The plugin does two things for dynamic variables whose (uppercase) name exactly matches a built-in or custom (lowercase) select field name:
- Dynamic variables are set to default values if unset
- The text fields for dynamic variables are converted to pulldown menus
- Install the plugin (after downloading and unzipping):
cd dynamicvariablesplugin/0.11 sudo python setup.py bdist_egg sudo cp dist/TracDynamicVariables*.egg /your/trac/location/plugins/
See TracPlugins for more installation details and options. You'll likely need to restart Trac's web server after installation.
- Enable the plugin:
[components] dynvars.* = enabled
You can alternatively use the Trac Web Admin GUI to enable any or all rules.
- Create/modify reports so that the name used for dynamic variables exactly match the name of the select field that it corresponds to. For example, a report for a specific
milestonethat also queries for a custom
queueselect field could be specified like this:
SELECT p.value AS __color__, t.id AS ticket, summary, component, severity, reporter, t.time AS created, changetime AS _changetime, t.description AS _description FROM ticket t LEFT OUTER JOIN milestone m ON t.milestone=m.name LEFT JOIN enum p ON p.name = t.severity AND p.type = 'severity' LEFT OUTER JOIN ticket_custom q ON q.ticket = t.id and q.name = 'queue' WHERE t.status <> 'closed' AND q.value = '$QUEUE' AND milestone= '$MILESTONE' ORDER BY m.due ASC, p.value, severity, t.time
If you have any issues, create a new ticket.
Download the zipped source from [download:dynamicvariablesplugin here].
There is (currently) no configuration options. Here's what the changes look like once enabled: