Changes between Version 23 and Version 24 of BlackMagicTicketTweaksPlugin


Ignore:
Timestamp:
Apr 9, 2015, 11:16:55 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with license

Legend:

Unmodified
Added
Removed
Modified
  • BlackMagicTicketTweaksPlugin

    v23 v24  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Various hacks to alter Ticket form behaviour and Ticket Permissions =
     3= Various hacks to alter Ticket form behaviour and Ticket Permissions
    44
    55'''Note:''' This hack is available for adoption.
    66
    7 == Description ==
     7== Description
    88
    9 Trac in 0.11 provided us with this incredibly powerful and terrible bit of dark power -- the ability to apply Genshi Transformers to the templates before they hit the user. The power is awesome; and with this plugin I have abused that power for evil purposes.
     9Trac 0.11 provides developers and administrators us with the ability to apply Genshi Transformers to the templates before they are presented to the user. This plugin adds the ability to tweak any of the Ticket fields, be they custom or standard, in the following ways:
     10 * disable - The field won't be editable.
     11 * hide - The field will be invisible.
     12 * label - Rename a field, in particular one of the built-in fields.
     13 * notice - Add a small notice below a field.
     14 * tip - Provide a Javascript tooltip when the control hovers over the field. Useful for example to give people a reminder for the difference between 'priority' and 'severity'.
     15 * permission - Set a permission that is required to edit that specific field. This is particularly useful in an environment where you let ''users'' set severity, so they need `TICKET_CHGPROP`, but you only want certain people to be able to edit the Priority.
    1016
    11 And there are plans for more evil in the future!
    12 
    13 Basically, the plugin adds the ability to tweak any of the Ticket fields-- be they custom or standard-- in the following ways:
    14  * disable - The field won't be editable.
    15  * hide - The field will simply be invisible.
    16  * label - Rename a field... in particular one of the built-in fields.
    17  * notice - Add a small notice below a field.
    18  * tip - Provide a pretty java-script tooltip when the control overs over the field. (Useful, for example, to give people a reminder for the difference between 'priority' and 'severity'
    19  * permission - Set a permission that is required to edit that specific field. This is particularly useful in an environment where you let ''users'' set severity-- so they need TICKET_CHGPROP-- but you only want certain people to be able to edit the Priority.
    20 
    21 The plugin also lets you define arbitrary permissions, say, MASTER_OF_PRIORITIES, if you want to require someone to have such a custom permission to edit a certain field.
     17The plugin also lets you define arbitrary permissions, say `MASTER_OF_PRIORITIES`, if you want to require someone to have such a custom permission to edit a certain field.
    2218
    2319The plugin can also deny access to certain ticket types by permissions using the ticket_type ini setting.
    2420
    25 == Bugs/Feature Requests ==
     21== Bugs/Feature Requests
    2622
    2723Existing bugs and feature requests for BlackMagicTicketTweaksPlugin are [query:status!=closed&component=BlackMagicTicketTweaksPlugin&order=priority here].
    2824
    2925If you have any issues, create a
    30 [/newticket?component=BlackMagicTicketTweaksPlugin&owner=obs new ticket] please cc yourself if you're anonymous or you won't be notified of when I respond!
     26[/newticket?component=BlackMagicTicketTweaksPlugin&owner=obs new ticket] please cc yourself if you're anonymous or you won't be notified of when I respond.
    3127
    32 [/query?status=new&status=assigned&status=reopened&group=severity&verbose=1&component=BlackMagicTicketTweaksPlugin&order=severity Detailed Tickets]
     28[[TicketQuery(component=BlackMagicTicketTweaksPlugin&group=type,format=progress)]]
    3329
    34 == Installation and Configuration ==
    35 
    36 === Prerequisites ===
    37 
    38 Latest Trac 0.11
    39 
    40 === Download ===
     30== Download
    4131
    4232 * Download the zipped source from [download:blackmagictickettweaksplugin here].
    4333 * You can check out BlackMagicTicketTweaksPlugin [/svn/blackmagictickettweaksplugin using Subversion], or [source:blackmagictickettweaksplugin browse the source] with Trac.
    4434
    45 === Installation ===
     35== Installation
    4636
    47 The easiest way to install the BlackMagicTicketTweaksPlugin is to simply point easy_install at the t-h.o SVN repository, a la:
     37=== Prerequisites
     38
     39Latest Trac 0.11 or later.
     40
     41=== Installation steps
     42
     43The easiest way to install the BlackMagicTicketTweaksPlugin is to point `easy_install` at the t-h.o SVN repository, such as:
    4844
    4945{{{
    5046#!sh
    51  easy_install http://trac-hacks.org/svn/blackmagictickettweaksplugin/0.11
     47easy_install http://trac-hacks.org/svn/blackmagictickettweaksplugin/0.11
    5248}}}
    5349
    54 Alternatively, you may download the source and go into the 0.11 directory and then run:
     50Alternatively, you may download the source and go into the Trac 0.11 directory and then run:
    5551
    5652{{{
    5753#!sh
    58  python setup.py install
     54python setup.py install
    5955}}}
    6056
    61 After you have installed the BlackMagicTicketTweaksPlugin, you must enable it. You can do so in the Administration panel of Trac, or in trac.ini by adding:
     57After you have installed the BlackMagicTicketTweaksPlugin, you must enable it. You can do so in the Administration panel of Trac, or in the `trac.ini` file by adding:
    6258
    6359{{{
     
    6763}}}
    6864
    69 === Configuration ===
     65== Configuration
    7066
    7167Any fields that you would like to tweak with this plugin must be listed in the ''tweaks'' option of the [blackmagic] section in your TracIni. This list is comma-separated and lower case. For example:
     
    7773}}}
    7874
    79 Next you must specify all the actions that you want performed on those fields. You may have as many actions as you'd like.
     75Next you must specify all the actions that you want performed on those fields. You can have as many actions as you like.
    8076
    81 The actions are specified as ''<field>.<action> = <value>''
     77The actions are specified as `<field>.<action> = <value>`:
    8278
    8379{{{
     
    9389 * on
    9490 * 1
    95 They are all case insensitive
     91They are all case insensitive.
    9692
    9793The following actions are supported:
    9894
    99  disable::
    100   * If True, the field will be present and its value shown but it won't be editable. By default the label will be striked out, but if you set the ''gray_disabled'' option to some value, that color will be used instead. Suggested value is something like ''#cccccc''
    101  hide::
    102   *  If True, the field will be completely removed and so not settable and invisible.
    103  label::
    104   * The label for the field will be renamed to this value. Not terribly useful for the custom fields, but it lets you adjust the default fields names.
    105  notice::
    106   * Adds a small notice under the field; useful for little notes about the field.
    107  tip::
    108   * If the mouse hovers over the field, a pretty little tooltip (javascript required) will pop up offering some explanation.
    109  permission::
    110   * A comma-separated list of permissions that the user must have at least one of to edit this field. If they do not, the field will be disabled (as above). This allows per-field permissions.
    111  ondenial::
    112   * This only means something on a field with a '''permission''' action set. In this case, it determines how to handle if the user has no such permission. Valid options are either 'disable' (default) or 'hide', both treated as if the field had such an action set as above.
     95 disable:: If True, the field will be present and its value shown but it won't be editable. By default the label will be striked out, but if you set the ''gray_disabled'' option to some value, that color will be used instead. Suggested value is `#cccccc`.
     96 hide:: If True, the field will be completely removed and so not settable and invisible.
     97 label:: The label for the field will be renamed to this value. Not useful for the custom fields, but it lets you adjust the default fields names.
     98 notice:: Adds a small notice under the field; useful for annotations on the field.
     99 tip:: If the mouse hovers over the field, a little tooltip will pop up offering some explanation. Javascript must be enabled for this to work.
     100 permission:: A comma-separated list of permissions that the user must have at least one of to edit this field. If they do not, the field will be disabled (as above). This allows per-field permissions.
     101 ondenial:: This only means something on a field with a '''permission''' action set. In this case, it determines how to handle if the user has no such permission. Valid options are either 'disable' (default) or 'hide', both treated as if the field had such an action set as above.
    113102
    114 You may create new permissions in Trac for use above (or anywhere you'd like, really) by specifying the ''permission'' option, as in (this feature is also available in the Trac core as of 0.12, see t:TracPermissions#CreatingNewPrivileges for more details):
     103You may create new permissions in Trac for use above (or anywhere you like) by specifying the ''permission'' option, as in:
    115104
    116105{{{
     
    120109}}}
    121110
    122 To deny access to a ticket type by permission use the following options
     111This feature is also available in the Trac core as of 0.12, see t:TracPermissions#CreatingNewPrivileges for more details.
    123112
    124 ticket_type.* = PERMISSION (replacing * with the ticket type, i.e. defect)
    125 I.e. to only allow users with the TICKET_MODIFY permission access to defect tickets you would set the following
     113To deny access to a ticket type by permission use the following options:
     114
     115`ticket_type.* = PERMISSION` replacing * with the ticket type, for example `defect`. So to only allow users with the `TICKET_MODIFY` permission access to defect tickets you would set the following:
    126116{{{
    127117#!ini
     
    134124Currently the ticket_type.* option can only hold one permission, if you want a comma separated list [/newticket?component=BlackMagicTicketTweaksPlugin&owner=obs raise a ticket] and request it.
    135125
    136 To use this option you will need to add BlackMagicTicketTweaks to the permission_policies option in the [trac] section of the trac.ini i.e.
     126To use this option you will need to add BlackMagicTicketTweaks to the permission_policies option in the [trac] section of the `trac.ini` file:
    137127
    138128{{{
     
    142132}}}
    143133
    144 == Example ==
     134== Example
    145135
    146136{{{
     
    156146}}}
    157147
    158 == Recent Changes ==
     148== Recent Changes
    159149
    160150[[ChangeLog(blackmagictickettweaksplugin, 3)]]
    161151
    162 == Author/Contributors ==
     152== Author/Contributors
    163153
    164154'''Author:''' [wiki:ixokai] [[BR]]
    165 '''Maintainer:''' ''none'' [[BR]]
     155'''Maintainer:''' [[Maintainer]] [[BR]]
    166156'''Contributors:''' obs