Changes between Initial Version and Version 1 of TracTicketsCustomFields


Ignore:
Timestamp:
11/14/05 13:36:26 (18 years ago)
Author:
trac
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   * order: Sort order placement. (Determines relative placement in forms.) 
     24 * '''checkbox''': A boolean value check box. 
     25   * label: Descriptive label. 
     26   * value: Default value (0 or 1). 
     27   * order: Sort order placement. 
     28 * '''select''': Drop-down select box. Uses a list of values. 
     29   * options: List of values, separated by '''|''' (vertical pipe). 
     30   * value: Default value (Item #, starting at 0). 
     31   * order: Sort order placement. 
     32 * '''radio''': Radio buttons. Essentially the same as '''select'''. 
     33   * label: Descriptive label. 
     34   * options: List of values, separated by '''|''' (vertical pipe). 
     35   * value: Default value (Item #, starting at 0). 
     36   * order: Sort order placement. 
     37 * '''textarea''': Multi-line text area. 
     38   * label: Descriptive label. 
     39   * value: Default text. 
     40   * width: Width in columns. 
     41   * height: Height in lines. 
     42   * order: Sort order placement. 
     43 
     44=== Sample Config === 
     45{{{ 
     46[ticket-custom] 
     47test_one = text 
     48test_one.label = Just a text box 
     49 
     50test_two = text 
     51test_two.label = Another text-box 
     52test_two.value = Just a default value 
     53 
     54test_three = checkbox 
     55test_three.label = Some checkbox 
     56test_three.value = 1 
     57 
     58test_four = select 
     59test_four.label = My selectbox 
     60test_four.options = one|two|third option|four 
     61test_four.value = 2 
     62 
     63test_five = radio 
     64test_five.label = Radio buttons are fun 
     65test_five.options = uno|dos|tres|cuatro|cinco 
     66test_five.value = 1 
     67 
     68test_six = textarea 
     69test_six.label = This is a large textarea 
     70test_six.value = Default text 
     71test_six.width = 60 
     72test_six.height = 30 
     73}}} 
     74 
     75---- 
     76See also: TracTickets, TracIni