Changes between Version 30 and Version 31 of QueuesPlugin


Ignore:
Timestamp:
Mar 20, 2015, 3:41:29 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • QueuesPlugin

    v30 v31  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Manages ticket queues via drag-and-drop =
    4 
    5 == Description ==
    6 
    7 This plugin converts one or more reports into work "queues".  A work queue allows you to drag-and-drop tickets into their relative priority order (similar to the Netflix Queue).  Ticket positions in a queue get maintained in a custom field of your choosing. This plugin requires !JavaScript and [http://jqueryui.com/ jquery-ui] (included) for the sortable behavior.
    8 
    9 The motivation for this plugin is for when you want to organize a work load in the order you intend to tackle it - i.e., as a work queue.  Queues can be defined (i.e.,segmented) by milestone or any field(s) (or no fields). See the [wiki:QueuesPlugin#Examples examples below] for more details.
    10 
    11 
    12 == Configuration ==
     3= Manages ticket queues via drag-and-drop
     4
     5== Description
     6
     7This plugin converts one or more reports into work "queues". A work queue allows you to drag-and-drop tickets into their relative priority order (similar to the Netflix Queue). Ticket positions in a queue get maintained in a custom field of your choosing. This plugin requires !JavaScript and [http://jqueryui.com/ jquery-ui] (included) for the sortable behavior.
     8
     9The motivation for this plugin is for when you want to organize a work load in the order you intend to tackle it, ie as a work queue. Queues can be defined or segmented by milestone or any field(s) (or no fields). See the [wiki:QueuesPlugin#Examples examples below] for more details.
     10
     11== Configuration
     12
    1313 1. Install the plugin (after downloading and unzipping):
    1414 {{{#!sh
     
    1818}}}
    1919
    20  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.
    21 
    22  2. Enable the plugin:
     20 See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options. You will likely need to restart Trac's web server after installation.
     21
     22 2. Enable the plugin by adding the following to your `trac.ini` file:
    2323 {{{#!ini
    2424[components]
     
    2828 You can alternatively use the Trac Web Admin GUI to enable any or all rules.
    2929
    30  3. Create a custom field to contain the position information - example {{{trac.ini}}} config:
     30 3. Create a custom field to contain the position information, example `trac.ini` file:
    3131 {{{#!ini
    3232[ticket-custom]
     
    3535
    3636 4. Create/modify reports to be used as ticket queues whose first column's name must match the (custom) field created in step 3 above:
    37   * Can contain uppercase characters (which will get converted to lowercase)
    38   * Can use spaces (which will get removed)
    39 
    40  5. Tell the queues plugin which reports to convert to queues - example {{{trac.ini}}} config:
     37  * Can contain uppercase characters, which will get converted to lowercase.
     38  * Can use spaces, which will get removed.
     39
     40 5. Tell the queues plugin which reports to convert to queues, example `trac.ini` file:
    4141 {{{#!ini
    4242[queues]
     
    4545
    4646See the [wiki:QueuesPlugin#Examples examples below] for more detailed configuration examples, options and capabilities.
    47 
    4847
    4948== Bugs/Feature Requests ==
     
    5554[http://trac-hacks.org/newticket?component=QueuesPlugin&owner=robguttman new ticket].
    5655
    57 == Download ==
     56[[TicketQuery(component=QueuesPlugin&group=type,format=progress)]]
     57
     58== Download
    5859
    5960Download the zipped source from [download:queuesplugin here].
    6061
    61 == Source ==
     62== Source
    6263
    6364You can check out QueuesPlugin from [http://trac-hacks.org/svn/queuesplugin here] using Subversion, or [source:queuesplugin browse the source] with Trac.
    6465
    65 == Examples ==
    66 This plugin is built from several simple parts many of which are built into Trac (e.g., reports, dynamic variables).  This approach takes advantage of what Trac already offers while still providing a great deal of flexibility in how you configure the queues.  However, this flexibility is traded off against ease-of-use.  So consider this a warning that this plugin is for advanced users/administrators only!
    67 
    68 === Team work queue for all tickets ===
    69 The simplest example is a queue of all tickets.  Assuming you already created a new custom {{{position}}} field as described [wiki:QueuesPlugin#Configuration above], you can create a new report like this:
     66== Examples
     67
     68This plugin is built from many parts built into Trac, such as reports and dynamic variables. This approach takes advantage of what Trac already offers natively, while still providing flexibility in how you configure the queues. However, this flexibility is traded off against ease-of-use. So this plugin is for advanced users/administrators only!
     69
     70=== Team work queue for all tickets
     71
     72The simplest example is a queue of all tickets. Assuming you already created a new custom {{{position}}} field as described [wiki:QueuesPlugin#Configuration above], you can create a new report like this:
    7073{{{#!sql
    7174SELECT s.value AS __color__,
     
    8285}}}
    8386
    84 Notice that the first column is the {{{position}}} custom field and is defined as {{{p.value as position}}} - this is ''required''.  The first column's name must always match the name of the custom field used to maintain the queue position.  (You can name them whatever you want; they just have to match.)  In the ORDER BY clause, we cast the position field to an integer.  This example is for sqlite3; you'll need to check the syntax for the database you're using.  If your database does not support casting, you can use position padding option described below.  There are no other restrictions to the SQL you use for your reports (as far as I'm aware!).
    85 
    86 If the report above was created as, say, report {{{13}}}, then you would need to add it to the {{{[queues]}}} section of the {{{trac.ini}}} file:
     87Notice that the first column is the {{{position}}} custom field and is defined as {{{p.value as position}}} - this is ''required''  The first column's name must always match the name of the custom field used to maintain the queue position. You can name them whatever you want; they just have to match. In the ORDER BY clause, we cast the position field to an integer. This example is for sqlite3; you'll need to check the syntax for the database you're using. If your database does not support casting, you can use position padding option described below. There are no other restrictions to the SQL you use for your reports, as far as I'm aware!
     88
     89If the report above was created as, say, report {{{13}}}, then you would need to add it to the {{{[queues]}}} section of the `trac.ini` file:
    8790{{{#!ini
    8891[queues]
     
    9093}}}
    9194
    92 You may need to restart your Trac web server afterwards.  Here's a screenshot of the result with a few sample tickets:
     95You may need to restart your Trac web server afterwards. Here's a screenshot of the result with a few sample tickets:
    9396
    9497[[Image(example1.png)]]
     
    9699To reorder the tickets, simply drag and drop them to their desired position in the queue.
    97100
    98 === Team work queue per milestone ===
     101=== Team work queue per milestone
     102
    99103To order your work queue within a milestone, you could create a single report that uses a {{{$MILESTONE}}} [http://trac.edgewall.org/wiki/TracReports#AdvancedReports:DynamicVariables report dynamic variable] to set the milestone field:
    100104{{{#!sql
     
    124128In this example, I'm using the optional DynamicVariablesPlugin which converts the {{{MILESTONE}}} dynamic variable (aka argument) from a freeform textbox to a convenient dropdown menu at the right.
    125129
    126 === Team work queue per milestone with a Triage group ===
    127 The problem with the above example is that new tickets without a {{{position}}} field will get ordered above your other tickets.  This may not always be what you want.  So instead you can group the tickets into those with a position and those without and then individually drag-and-drop the new tickets into the ordered queue at your leisure.  Here's what the report could look like:
     130=== Team work queue per milestone with a Triage group
     131
     132The problem with the above example is that new tickets without a {{{position}}} field will get ordered above your other tickets. This may not always be what you want. So instead you can group the tickets into those with a position and those without and then individually drag-and-drop the new tickets into the ordered queue at your leisure. Here's what the report could look like:
    128133{{{#!sql
    129134SELECT s.value AS __color__,
     
    149154}}}
    150155
    151 In addition to updating {{{trac.ini}}} with the new report number, you now also need to describe what operation the plugin should take for each group:
     156In addition to updating `trac.ini` with the new report number, you now also need to describe what operation the plugin should take for each group:
    152157{{{#!ini
    153158[queues]
     
    156161}}}
    157162
    158 The {{{group.triage = clear}}} tells the plugin that the {{{Triage}}} group shouldn't reorder positions (reordering is the default operation).  The group name {{{Triage}}} is just an example - you can use any name as long as you make the config match it.  Here's the screenshot of the report:
     163The {{{group.triage = clear}}} tells the plugin that the {{{Triage}}} group shouldn't reorder positions (reordering is the default operation).  The group name {{{Triage}}} is just an example - you can use any name as long as you make the config match it. Here's the screenshot of the report:
    159164
    160165[[Image(example3.png)]]
    161166
    162 The tickets are now grouped with the Triage group at the top.  You can drag-and-drop tickets from the {{{Triage}}} group to anywhere in the {{{milestone1}}} group.  Furthermore, you can also clear the position from any ticket by dragging-and-dropping it from the {{{milestone1}}} group to anywhere in the {{{Triage}}} group (hence the full meaning of the {{{clear}}} operation described above).  (Note that currently a group must have at least one ticket in it to be able to drag-and-drop tickets into it.)  The full list of operation directives are:
     167The tickets are now grouped with the Triage group at the top. You can drag-and-drop tickets from the {{{Triage}}} group to anywhere in the {{{milestone1}}} group. Furthermore, you can also clear the position from any ticket by dragging-and-dropping it from the {{{milestone1}}} group to anywhere in the {{{Triage}}} group (hence the full meaning of the {{{clear}}} operation described above). Note that currently a group must have at least one ticket in it to be able to drag-and-drop tickets into it.
     168
     169The full list of operation directives is:
    163170
    164171 * {{{reorder}}} (the default)
     
    166173 * {{{ignore}}}
    167174
    168 There must be only one {{{reorder}}} group per report but you can have any number of {{{clear}}} and {{{ignore}}} groups.  The {{{ignore}}} operation will simply list the tickets that match your grouping but tickets can't be moved out of or into it.  This is useful, for example, if you want to show work in the queue that has been implemented but still in, say, a {{{verifying}}} state and not yet closed.  The SQL syntax is left as an exercise to the reader.  :)
     175There must be only one {{{reorder}}} group per report but you can have any number of {{{clear}}} and {{{ignore}}} groups. The {{{ignore}}} operation will simply list the tickets that match your grouping but tickets can't be moved out of or into it. This is useful, for example, if you want to show work in the queue that has been implemented but still in, say, a {{{verifying}}} state and not yet closed. The SQL syntax is left as an exercise to the reader.
    169176
    170177TIP: You can click on any {{{clear}}} or {{{ignore}}} group heading to toggle between hiding and showing its tickets.
    171178
    172 === Team work queue per custom field ===
    173 Another use case is when you want to retain the use of milestones as an orthogonal, date-based means to manage work and use a separate custom field to define queues.  For example:
     179=== Team work queue per custom field
     180
     181Another use case is when you want to retain the use of milestones as an orthogonal, date-based means to manage work and use a separate custom field to define queues. For example:
    174182{{{#!ini
    175183[ticket-custom]
     
    179187}}}
    180188
    181 You can simply re-write your SQL query to pivot on a {{{$QUEUE}}} dynamic variable, in this example, instead of (or perhaps in addition to) a {{{$MILESTONE}}} dynamic variable.  The important thing is that the {{{position}}} custom field must only be used for one and only one queue.
    182 
    183 === Personal work queue ===
    184 It should be clear by now that you can create a queue for just about any SQL report as long as the {{{position}}} custom field is used for one and only one queue.  Another use case is if you want to use queues simply to let users manage their own work load.  You can simply create a report that pivots on the special, built-in {{{$USER}}} dynamic variable.  Viola!  Personal work queues for everyone using a single report.
    185 
    186 === Team work queue ''and'' personal work queue ===
    187 What if you wanted both a team work queue that pivoted on, say, a custom {{{queue}}} field and personal work queues as described above.  We can't reuse the same {{{position}}} field for each queue.  The answer?  Create a second custom field to manage the personal work queue's position:
     189You can simply re-write your SQL query to pivot on a {{{$QUEUE}}} dynamic variable, in this example, instead of (or perhaps in addition to) a {{{$MILESTONE}}} dynamic variable. The important thing is that the {{{position}}} custom field must only be used for one and only one queue.
     190
     191=== Personal work queue
     192
     193You can create a queue for just about any SQL report as long as the {{{position}}} custom field is used for one and only one queue. Another use case is if you want to use queues simply to let users manage their own work load. You can simply create a report that pivots on the special, built-in {{{$USER}}} dynamic variable.  Viola! Personal work queues for everyone using a single report.
     194
     195=== Team work queue ''and'' personal work queue
     196
     197What if you wanted both a team work queue that pivoted on, say, a custom {{{queue}}} field and personal work queues as described above? We can't reuse the same {{{position}}} field for each queue. The answer is to create a second custom field to manage the personal work queue's position:
    188198{{{#!ini
    189199[ticket-custom]
     
    194204}}}
    195205
    196 Now you can use the {{{position}}} field as before for the team work queues and the {{{myposition}}} field for the personal work queues using all of the techniques described above.  So for instance, the personal work queue in this case may define the first column as {{{mp.value as "My Position"}}}. Any uppercase letters are converted to lowercase and any spaces are removed in order to determine the correct field name.
    197 
    198 === Development work queue ''and'' Product Management work queue ===
    199 The same principle described above for simultaneously supporting team and personal work queues can be used to enable work queues for multiple stakeholders by using separate {{{position}}} fields.  So for example, Product Management may want to express their preferred order of work (beyond what a {{{priority}}} field permits) while the development team can use a report/queue that shows Product Management's preferred ordering alongside their own ordering.
    200 
    201 Hopefully it's clear that many variants of this use case are possible.
    202 
    203 
    204 == Tips / Options ==
    205 === Position padding ===
    206 Whether or not you cast the {{{position}}} field into an integer for report ordering, you still may want to pad your position numbers with leading {{{0}}}s so that they sort correctly in any report or custom query in which they appear.  You set this up globally in {{{trac.ini}}}:
     206Now you can use the {{{position}}} field as before for the team work queues and the {{{myposition}}} field for the personal work queues using all of the techniques described above. So for instance, the personal work queue in this case may define the first column as {{{mp.value as "My Position"}}}. Any uppercase letters are converted to lowercase and any spaces are removed in order to determine the correct field name.
     207
     208=== Development work queue ''and'' Product Management work queue
     209
     210The same principle described above for simultaneously supporting team and personal work queues can be used to enable work queues for multiple stakeholders by using separate {{{position}}} fields. So for example, Product Management may want to express their preferred order of work (beyond what a {{{priority}}} field permits) while the development team can use a report/queue that shows Product Management's preferred ordering alongside their own ordering.
     211
     212== Tips / Options
     213
     214=== Position padding
     215
     216Whether or not you cast the {{{position}}} field into an integer for report ordering, you still may want to pad your position numbers with leading {{{0}}}s so that they sort correctly in any report or custom query in which they appear. You set this up globally in `trac.ini`:
    207217{{{#!ini
    208218[queues]
     
    210220}}}
    211221
    212 A {{{pad_length}}} of {{{2}}} is the default.  This means that position 1 will become position {{{01}}}, etc.  Position 10 remains {{{10}}}, and 100 remains {{{100}}}.  Set it to {{{1}}} for no padding.
    213 
    214 === Maximum position ===
    215 Typically, the further down a queue you go, the less accurate the ordering becomes.  This is natural.  Which means that after a point, ordering doesn't really matter anymore.  One way to help reinforce this is by defining a {{{max_position}}} value:
     222A {{{pad_length}}} of {{{2}}} is the default. This means that position 1 will become position {{{01}}}, etc. Position 10 remains {{{10}}}, and 100 remains {{{100}}}. Set it to {{{1}}} for no padding.
     223
     224=== Maximum position
     225
     226Typically, the further down a queue you go, the less accurate the ordering becomes. This is natural. Which means that after a point, ordering doesn't really matter anymore. One way to help reinforce this is by defining a {{{max_position}}} value:
    216227{{{#!ini
    217228[queues]
     
    219230}}}
    220231
    221 A {{{max_position}}} of {{{99}}} is the default.  This means that positions 100 and beyond will get set to position {{{99}}} whenever they appear in a queue.  Set it to {{{0}}} for no maximum.
    222 
    223 === "Max items per page" ===
    224 Trac automatically paginates reports that contain more tickets than the defined "Max items per page".  Depending on your usage of queues, you may want to either set this value lower (or higher) globally for all reports in {{{trac.ini}}}:
     232A {{{max_position}}} of {{{99}}} is the default. This means that positions 100 and beyond will get set to position {{{99}}} whenever they appear in a queue. Set it to {{{0}}} for no maximum.
     233
     234=== "Max items per page"
     235
     236Trac automatically paginates reports that contain more tickets than the defined "Max items per page". Depending on your usage of queues, you may want to either set this value lower (or higher) globally for all reports in `trac.ini`:
    225237{{{#!ini
    226238[report]
     
    228240}}}
    229241
    230 .. or bookmark the report queue with a {{{max=N}}} argument as desired.  For example, seeing a long queue can be overwhelming or intimidating to some, so you may want to encourage the team to only look at the first 10 or 20 tickets using this argument.  However, note that queue reordering only works on the first page of a report queue (it's disabled for subsequent pages).  So if you need to reorder items on the second or third page, increase the "Max items per page" argument as needed.
    231 
    232 === Enhanced user experience ===
     242.. or bookmark the report queue with a {{{max=N}}} argument as desired. For example, seeing a long queue can be overwhelming or intimidating to some, so you may want to encourage the team to only look at the first 10 or 20 tickets using this argument. However, note that queue reordering only works on the first page of a report queue (it's disabled for subsequent pages). So if you need to reorder items on the second or third page, increase the "Max items per page" argument as needed.
     243
     244=== Enhanced user experience
     245
    233246Depending on how you use work queues, several complementary plugins may enhance the user experience:
    234247
     
    236249 * DynamicFieldsPlugin - allows you to clear the {{{position}}} field when the milestone/queue field changes and hide the {{{myposition}}} field from general view.  These are just small examples of how the plugin can enhance the user experience of this queues plugin.
    237250 * HideChangesPlugin - can hide ticket changes that do not have comments thus reducing the noise from queue reordering changes.  See the next audit section for other options.
    238  * QuietPlugin - dynamically disables email sending when using the AnnouncerPlugin which helps reduce low-value email noise when using the {{{ticket}}} audit option (see below).
    239 
    240 === Auditing ticket reorderings ===
    241 Changing the value of custom fields would normally cause a ticket change which would show up on the ticket.  This may be just what you want to audit queue reorderings, however it can be quite noisy.  So this plugin allows you to select from several different methods to audit queue reorderings in {{{trac.ini}}}:
     251 * QuietPlugin - dynamically disables email sending when using the AnnouncerPlugin which helps reduce low-value email noise when using the {{{ticket}}} audit option, see below.
     252
     253=== Auditing ticket reorderings
     254
     255Changing the value of custom fields would normally cause a ticket change which would show up on the ticket. This may be just what you want to audit queue reorderings, however it can be quite noisy. So this plugin allows you to select from several different methods to audit queue reorderings in `trac.ini`:
    242256{{{#!ini
    243257[queues]
     
    250264 * {{{none}}} - no auditing at all
    251265
    252 Please note that the default audit option is {{{log}}}.  It is recommended that you use and configure the HideChangesPlugin to hide commentless changes if you opt for the {{{ticket}}} auditing method.  Why would anyone use the {{{none}}} option?  You may want queue reorderings to be as lightweight as possible to encourage its use.  Having no record of changes is the lightest weight option.  The {{{ticket}}} option is the heaviest weight which may discourage its use and also may generate many emails depending on the notification system you're using (see QuietPlugin as one means to prevent these emails while using {{{ticket}}} audit mode).  The {{{log}}} option is a middle-ground of the three.
    253 
    254 
    255 == Recent Changes ==
     266Please note that the default audit option is {{{log}}}. It is recommended that you use and configure the HideChangesPlugin to hide commentless changes if you opt for the {{{ticket}}} auditing method. Why would anyone use the {{{none}}} option? You may want queue reorderings to be as lightweight as possible to encourage its use. Having no record of changes is the lightest weight option. The {{{ticket}}} option is the heaviest weight which may discourage its use and also may generate many emails depending on the notification system you're using (see QuietPlugin as one means to prevent these emails while using {{{ticket}}} audit mode). The {{{log}}} option is a middle-ground of the three.
     267
     268== Recent Changes
    256269
    257270[[ChangeLog(queuesplugin, 3)]]
    258271
    259 == Author/Contributors ==
     272== Author/Contributors
    260273
    261274'''Author:''' [wiki:robguttman] [[BR]]
    262 '''Maintainer:''' [wiki:robguttman] [[BR]]
     275'''Maintainer:''' [[Maintainer]] [[BR]]
    263276'''Contributors:'''