Edgewall Software

Changes between Initial Version and Version 1 of TracTicketsCustomFields


Ignore:
Timestamp:
Nov 10, 2004, 7:13:44 PM (19 years ago)
Author:
daniel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketsCustomFields

    v1 v1  
     1= Custom Ticket Fields =
     2Trac support adding custom, user-defined, fields to the ticket module. Using custom fields, you can add typed, site-specific, properties to tickets.
     3
     4'''Note: In Trac 0.8, this feature is still experimental.'''
     5
     6== Configuriation ==
     7Configuring custom ticket fields is done in the TracIni config file.
     8
     9All field definitions should be under a section named [ticket-custom] in the ini-file.
     10
     11The syntax of each field definition is:
     12{{{
     13 FIELD_NAME = TYPE
     14 (FIELD_NAME.OPTION = VALUE)
     15 ...
     16}}}
     17Looking at the example below should help explain the syntax.
     18
     19=== Available Field Types and Options ===
     20 * '''text''': A simple (one line) text field
     21   * label: Descriptive label
     22   * value: Default value
     23 * '''checkbox''': A boolean value check box
     24   * label: Descriptive label
     25   * value: Default value (0 or 1)
     26 * '''select''': Drop-down select box. Uses a list of values.
     27   * options: List of values, separated by '''|''' (vertical pipe)
     28   * value: Default value (Item #, starting at 0)
     29 * '''radio''': Radio buttons. Essentially the same as '''select'''.
     30   * label: Descriptive label
     31   * options: List of values, separated by '''|''' (vertical pipe)
     32   * value: Default value (Item #, starting at 0)
     33 * '''textarea''': Multi-line text area.
     34   * label: Descriptive label
     35   * value: Default text
     36   * width: Width in columns
     37   * height: Height in lines
     38
     39=== Sample Config ===
     40{{{
     41[ticket-custom]
     42test_one = text
     43test_one.label = Just a text box
     44
     45test_two = text
     46test_two.label = Another text-box
     47test_two.value = Just a default value
     48
     49test_three = checkbox
     50test_three.label = Some checkbox
     51test_three.value = 1
     52
     53test_four = select
     54test_four.label = My selectbox
     55test_four.options = one|two|third option|four
     56test_four.value = 2
     57
     58test_five = radio
     59test_five.label = Radio buttons are fun
     60test_five.options = uno|dos|tres|cuatro|cinco
     61test_five.value = 1
     62
     63test_six = textarea
     64test_six.label = This is a large textarea
     65test_six.value = Default text
     66test_six.width = 60
     67test_six.height = 30
     68}}}
     69
     70----
     71See also: TracTickets, TracIni