Changes between Version 10 and Version 11 of DynamicVariablesPlugin


Ignore:
Timestamp:
Aug 25, 2015, 9:20:30 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, rearranged paragraphs to maintain consistency

Legend:

Unmodified
Added
Removed
Modified
  • DynamicVariablesPlugin

    v10 v11  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Default and convert report dynamic variables to pulldowns =
     3= Default and convert report dynamic variables to pulldowns
    44
    5 == Description ==
     5== Description
    66
    77This plugin applies to all [http://trac.edgewall.org/wiki/TracReports#AdvancedReports:DynamicVariables 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:
     
    1212!JavaScript is required for the second feature above.
    1313
    14 == Configuration ==
     14== Bugs/Feature Requests
     15
     16Existing bugs and feature requests for DynamicVariablesPlugin are
     17[report:9?COMPONENT=DynamicVariablesPlugin here].
     18
     19If you have any issues, create a
     20[/newticket?component=DynamicVariablesPlugin new ticket].
     21
     22[[TicketQuery(component=DynamicVariablesPlugin&group=type,format=progress)]]
     23
     24== Download
     25
     26Download the zipped source from [download:dynamicvariablesplugin here].
     27
     28== Source
     29
     30You can check out DynamicVariablesPlugin from [http://trac-hacks.org/svn/dynamicvariablesplugin here] using Subversion, or [source:dynamicvariablesplugin browse the source] with Trac.
     31
     32== Installation and Configuration
     33
    1534 1. Install the plugin (after downloading and unzipping):
    16     {{{
    17     #!sh
     35    {{{#!sh
    1836    cd dynamicvariablesplugin/0.12
    1937    sudo python setup.py bdist_egg
     
    2139    }}}
    2240
    23     See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options.  You'll likely need to restart Trac's web server after installation.
     41 See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options.  You'll likely need to restart Trac's web server after installation.
    2442
    2543 2. Enable the plugin:
    26     {{{
    27     #!ini
     44    {{{#!ini
    2845    [components]
    2946    dynvars.* = enabled
    3047    }}}
    3148
    32     You can alternatively use the Trac Web Admin GUI to enable any or all rules.
     49 You can alternatively use the Trac Web Admin GUI to enable any or all rules.
    3350
    3451 3. (Optional) Set a {{{[dynvars]}}} section of field names with explicit option values.  Example:
    35     {{{
    36     #!ini
     52    {{{#!ini
    3753    [dynvars]
    3854    daysback.options = 7|30
    3955    }}}
    4056
    41     In the above example, {{{daysback}}} is not a custom ticket field but can set a {{{DAYSBACK}}} dynamic variable via a pulldown with the specified options. A {{{[dynvars]}}} section is not needed to configure dynamic variables that exactly match built-in or custom field names as shown in the screenshots below.
     57 In the above example, {{{daysback}}} is not a custom ticket field but can set a {{{DAYSBACK}}} dynamic variable via a pulldown with the specified options. A {{{[dynvars]}}} section is not needed to configure dynamic variables that exactly match built-in or custom field names as shown in the screenshots below.
    4258
    43  4. Create/modify reports so that the names used for dynamic variables exactly match the names of the select field that it corresponds to.  See an example below.
     59 4. Create/modify reports so that the names used for dynamic variables exactly match the names of the select field that it corresponds to. See an example below.
    4460
    45 == Bugs/Feature Requests ==
     61== Example
    4662
    47 Existing bugs and feature requests for DynamicVariablesPlugin are
    48 [report:9?COMPONENT=DynamicVariablesPlugin here].
    49 
    50 If you have any issues, create a
    51 [http://trac-hacks.org/newticket?component=DynamicVariablesPlugin&owner=robguttman new ticket].
    52 
    53 == Download ==
    54 
    55 Download the zipped source from [download:dynamicvariablesplugin here].
    56 
    57 == Source ==
    58 
    59 You can check out DynamicVariablesPlugin from [http://trac-hacks.org/svn/dynamicvariablesplugin here] using Subversion, or [source:dynamicvariablesplugin browse the source] with Trac.
    60 
    61 == Example ==
    62 The only required configuration is in defining SQL reports.  For example, a report for a specific {{{milestone}}} that also queries for a custom {{{queue}}} select field could be defined like this:
    63 {{{
    64 #!sql
    65 SELECT p.value AS __color__,
    66    t.id AS ticket, summary, component, severity, reporter
     63The only required configuration is in defining SQL reports. For example, a report for a specific {{{milestone}}} that also queries for a custom {{{queue}}} select field could be defined like this:
     64{{{#!sql
     65SELECT p.value AS __color__, t.id AS ticket, summary, component, severity, reporter
    6766  FROM ticket t
    6867  LEFT OUTER JOIN milestone m ON t.milestone = m.name
    6968  LEFT JOIN enum p ON p.name = t.severity AND p.type = 'severity'
    70   LEFT OUTER JOIN ticket_custom q ON q.ticket = t.id and q.name = 'queue'
     69  LEFT OUTER JOIN ticket_custom q ON q.ticket = t.id AND q.name = 'queue'
    7170  WHERE q.value = '$QUEUE'
    7271    AND milestone = '$MILESTONE'
     
    7473}}}
    7574
    76 Here's what this report would look like both before and after this plugin is installed and enabled:
     75The result is as follows:
    7776
    78 === Before ===
     77=== Before
     78
    7979[[Image(before.png)]]
    8080
    81 === After ===
     81=== After
     82
    8283[[Image(after.png)]]
    8384
    8485Completed milestones are omitted from the pulldown menu.
    8586
    86 == Recent Changes ==
     87== Recent Changes
    8788
    8889[[ChangeLog(dynamicvariablesplugin, 3)]]
    8990
    90 == Author/Contributors ==
     91== Author/Contributors
    9192
    9293'''Author:''' [wiki:robguttman] [[BR]]
    93 '''Maintainer:''' [wiki:robguttman] [[BR]]
     94'''Maintainer:''' [[Maintainer]] [[BR]]
    9495'''Contributors:'''