Changes between Version 6 and Version 7 of TracTicketsCustomFields


Ignore:
Timestamp:
10/12/21 10:39:25 (12 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketsCustomFields

    v6 v7  
    44== Configuration
    55
    6 Configuring custom ticket fields is done in the [wiki:TracIni trac.ini] file. All field definitions should be under a section named `[ticket-custom]`.
     6Configure custom ticket fields in the [TracIni#ticket-custom-section "[ticket-custom]"] section of trac.ini.
    77
    88The syntax of each field definition is:
     
    5555   * label: Descriptive label.
    5656   * value: Default value.
    57    * order: Sort order placement; this determines relative placement in forms with respect to other custom fields.
    58    * format: One of:
    59      * `plain` for plain text
    60      * `wiki` to interpret the content as WikiFormatting
    61      * `reference` to treat the content as a queryable value (''since 1.0'')
    62      * `list` to interpret the content as a list of queryable values, separated by whitespace (''since 1.0'')
     57   * order: Sort order placement relative to other custom fields.
     58   * max_size: Maximum allowed size in characters (//Since 1.3.2//).
     59   * format: One of:
     60     * `plain` for plain text
     61     * `wiki` for [WikiFormatting wiki formatted] content
     62     * `reference` to treat the content as a queryable value
     63     * `list` to interpret the content as a list of queryable values, separated by whitespace
     64   * ticketlink_query: Query for linkifying ticket values.
     65     Not applicable for format `plain` and `wiki`.
    6366 * '''checkbox''': A boolean value check box.
    6467   * label: Descriptive label.
    6568   * value: Default value, 0 or 1.
    6669   * order: Sort order placement.
     70   * ticketlink_query: Query for linkifying ticket values.
    6771 * '''select''': Drop-down select box. Uses a list of values.
    6872   * label: Descriptive label.
     
    7074   * value: Default value (one of the values from options).
    7175   * order: Sort order placement.
     76   * ticketlink_query: Query for linkifying ticket values.
    7277 * '''radio''': Radio buttons. Essentially the same as '''select'''.
    7378   * label: Descriptive label.
     
    7580   * value: Default value, one of the values from options.
    7681   * order: Sort order placement.
     82   * ticketlink_query: Query for linkifying ticket values.
    7783 * '''textarea''': Multi-line text area.
    7884   * label: Descriptive label.
    7985   * value: Default text.
    80    * cols: Width in columns. //(Removed in 1.1.2)//
    8186   * rows: Height in lines.
    8287   * order: Sort order placement.
     88   * max_size: Maximum allowed size in characters (//Since 1.3.2//).
    8389   * format: Either `plain` for plain text or `wiki` to interpret the content as WikiFormatting.
    84  * '''time''': Date and time picker. (''Since 1.1.1.'')
     90 * '''time''': Date and time picker. (//Since 1.1.1//)
    8591   * label: Descriptive label.
    8692   * value: Default date.
     
    95101Macros will be expanded when rendering `textarea` fields with format `wiki`, but not when rendering `text` fields with format `wiki`.
    96102
     103For applicable fields, the `ticketlink_query` option
     104overrides [[TracIni#query-ticketlink_query-option|"[query] ticketlink_query"]], and the format is the same as
     105that option. When the `ticketlink_query` option
     106is not specified, `[query]` `ticketlink_query` is used to
     107linkify the field.
     108
    97109=== Sample Configuration
    98110
     
    119131test_five = radio
    120132test_five.label = Radio buttons are fun
    121 test_five.options = uno|dos|tres|cuatro|cinco
     133test_five.options = |uno|dos|tres|cuatro|cinco
    122134test_five.value = dos
    123135
     
    144156}}}
    145157
    146 '''Note''': To make a `select` type field optional, specify a leading `|` in the `fieldname.options` option.
     158'''Note''': To make a `select` type field optional, specify a leading `|` in `fieldname.options` (e.g. `test_five`).
    147159
    148160=== Reports Involving Custom Fields
     
    178190Note in particular the `LEFT OUTER JOIN` statement here.
    179191
    180 Note that if your config file uses an '''uppercase''' name:
     192Note that option names in trac.ini are case-insensitive, so even if your option name includes uppercase characters:
    181193{{{#!ini
    182194[ticket-custom]
    183 
    184195Progress_Type = text
    185196}}}
    186 you would use '''lowercase''' in the SQL: `AND c.name = 'progress_type'`.
     197you must use '''lowercase''' in the SQL: `AND c.name = 'progress_type'`.
    187198
    188199----