37 | | You can check out BlackMagicTicketTweaksPlugin from [http://trac-hacks.org/svn/blackmagictickettweaksplugin here] using Subversion, or [source:blackmagictickettweaksplugin browse the source] with Trac. |
| 36 | You probably need to install Genshi from the trunk before this will work (>=0.5dev), at least until 0.11 comes out final. |
| 37 | |
| 38 | === Download === |
| 39 | |
| 40 | * Download the zipped source from [download:blackmagictickettweaksplugin here]. |
| 41 | * You can check out BlackMagicTicketTweaksPlugin from [http://trac-hacks.org/svn/blackmagictickettweaksplugin here] using Subversion, or [blackmagictickettweaksplugin browse the source] with Trac. |
| 42 | |
| 43 | === Installation === |
| 44 | |
| 45 | The easiest way to install the BlackMagicTicketTweaksPlugin is to simply point easy_install at the t-h.o SVN repository, a la: |
| 46 | |
| 47 | {{{ |
| 48 | easy_install http://trac-hacks.org/svn/blackmagictickettweaksplugin/0.11 |
| 49 | }}} |
| 50 | |
| 51 | Alternatively, you may download the source and go into the 0.11 directory and then run: |
| 52 | |
| 53 | {{{ |
| 54 | python setup.py install |
| 55 | }}} |
| 56 | |
| 57 | 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: |
| 58 | |
| 59 | {{{ |
| 60 | [components] |
| 61 | blackmagic.* = enabled |
| 62 | }}} |
| 63 | |
| 64 | === Configuration === |
| 65 | |
| 66 | Any fields that you would like to tweak with this plugin must be listed in the ''tweaks'' option of the [blackmagictickettweaks] section in your TracIni. This list is comma-separated and lower case. For example: |
| 67 | |
| 68 | {{{ |
| 69 | [blackmagictickettweaks] |
| 70 | tweaks = cc, priority, severity |
| 71 | }}} |
| 72 | |
| 73 | Next you must specify all the actions that you want performed on those fields. You may have as many actions as you'd like. |
| 74 | |
| 75 | The actions are specified as ''<field>.<action> = <value>'' |
| 76 | |
| 77 | {{{ |
| 78 | [blackmagictickettweaks] |
| 79 | tweaks = priority |
| 80 | priority.permission = TRAC_ADMIN |
| 81 | }}} |
| 82 | |
| 83 | The following actions are supported at this time: |
| 84 | |
| 85 | disable:: |
| 86 | * If True, the field will be present and its value shown but it won't be editable. |
| 87 | hide:: |
| 88 | * If True, the field will be completely removed and so not settable and invisible. |
| 89 | label:: |
| 90 | * 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. |
| 91 | notice:: |
| 92 | * Adds a small notice under the field; useful for little notes about the field. |
| 93 | tip:: |
| 94 | * If the mouse hovers over the field, a pretty little tooltip (javascript required) will pop up offering some explanation. |
| 95 | permission:: |
| 96 | * 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. |
| 97 | |
| 98 | You may create new permissions in Trac for use above (or anywhere you'd like, really) by specifying the ''permission'' option, as in: |
| 99 | |
| 100 | {{{ |
| 101 | [blackmagictickettweaks] |
| 102 | permissions = TICKET_CHG_PRIORITY, TICKET_CHG_CC |
| 103 | }}} |