| 33 | |
| 34 | Enable the plugin in your trac.ini file: |
| 35 | |
| 36 | {{{#!ini |
| 37 | [components] |
| 38 | ticketfieldfilter.* = enabled |
| 39 | }}} |
| 40 | |
| 41 | === Configuration |
| 42 | Note that configuration can be changed using an admin page in the ''Ticket'' section. |
| 43 | |
| 44 | For each ticket type you may set: |
| 45 | * Which fields to show at all |
| 46 | * If a shown field is read only. Read only fields don't show up in the ''Modify'' section. |
| 47 | * A permission for a field. If the user doesn't have the necessary permission, the field is removed. |
| 48 | |
| 49 | Note that permissions only apply to fields which are enabled at all for the ticket type. |
| 50 | |
| 51 | Each entry in ''trac.ini'' starts with the ticket type. |
| 52 | {{{#!ini |
| 53 | [ticket-field-filter] |
| 54 | <type>.fields = component, cc, type, ... |
| 55 | <type>.readonly = component, cc, ... |
| 56 | <type>.permission = component: PERM_1 | TICKET_CREATE, cc: PERM_2, ... |
| 57 | }}} |
| 58 | Leaving the entry {{{<type>.fields}}} empty disables all fields for the ticket type. Removing the entry completely enables all fields. Another way is to specify ''+'': |
| 59 | |
| 60 | {{{#!ini |
| 61 | [ticket-field-filter] |
| 62 | # enable all fields for ticket type 'defect' |
| 63 | defect.fields = + |
| 64 | }}} |
| 65 | |
| 66 | Note that the following fields can't be removed from the ticket page: |
| 67 | |
| 68 | {{{time, changetime, attachment}}} |
| 69 | |
| 70 | If the permission entry is missing or left empty no permission check takes place. |
| 71 | |
| 72 | You may specify a list of fields which are always shown: |
| 73 | |
| 74 | {{{#!ini |
| 75 | [ticket-field-filter] |
| 76 | required_fields = summary, reporter, owner, description, status, type, cc |
| 77 | }}} |
| 78 | |
| 79 | Default is: {{{summary, reporter, owner, description, status}}}. |