wiki:BlackMagicTicketTweaksPlugin

Version 1 (modified by Stephen Hansen, 16 years ago) (diff)

New hack BlackMagicTicketTweaksPlugin, created by ixokai

Various hacks to alter Ticket form behavior

Description

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.

And there are plans for more evil in the future!

Basically, the plugin adds the ability to tweak any of the Ticket fields-- be they custom or standard-- in the following ways:

  • disable - The field won't be editable.
  • hide - The field will simply be invisible.
  • label - Rename a field... in particular one of the built-in fields.
  • notice - Add a small notice below a field.
  • 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'
  • 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.

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.

More evil hacks to come-- one day, I'll make it so the fields available in COMPONENT (For example) will be different depending on what Ticket Type you choose.

P.S. I am emphasizing the 'evil hackitude' of this because it seems terribly unclean and a bad idea to abuse. But it works for me! :)

Bugs/Feature Requests

Existing bugs and feature requests for BlackMagicTicketTweaksPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:blackmagictickettweaksplugin here].

Source

You can check out BlackMagicTicketTweaksPlugin from here using Subversion, or browse the source with Trac.

Example

[blackmagic]
permissions = MASTER_OF_PERMISSIONS
tweaks = severity, priority
priority.tip = The priority is the Project-defined importance of the issue, and in general the order in which thigns will tend to be done.
severity.tip = The severity is how important this issue is to the customer or you.
priority.permission = MASTER_OF_PERMISSIONS

Recent Changes

17905 by rjollos on 2020-12-04 00:46:32
TracBlackMagicTicketTweaks 0.12.4: Change plugin name
17699 by rjollos on 2020-04-28 23:39:50
BlackMagicTicketTweaks 0.12.3: Use imports from Trac rather than Genshi
17127 by rjollos on 2018-04-16 08:37:44
BlackMagicTicketTweaks 0.12.3: Remove implements IPermissionStore

The plugin does not actually implement the
IPermissionStore interface.

(more)

Author/Contributors

Author: ixokai
Contributors: