Changes between Version 1 and Version 2 of TracTicketsCustomFields
- Timestamp:
- 19/04/2022 13:22:06 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTicketsCustomFields
v1 v2 4 4 == Configuration 5 5 6 Configur ing custom ticket fields is done in the [wiki:TracIni trac.ini] file. All field definitions should be under a section named `[ticket-custom]`.6 Configure custom ticket fields in the [TracIni#ticket-custom-section "[ticket-custom]"] section of trac.ini. 7 7 8 8 The syntax of each field definition is: … … 55 55 * label: Descriptive label. 56 56 * 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`. 63 66 * '''checkbox''': A boolean value check box. 64 67 * label: Descriptive label. 65 68 * value: Default value, 0 or 1. 66 69 * order: Sort order placement. 70 * ticketlink_query: Query for linkifying ticket values. 67 71 * '''select''': Drop-down select box. Uses a list of values. 68 72 * label: Descriptive label. … … 70 74 * value: Default value (one of the values from options). 71 75 * order: Sort order placement. 76 * ticketlink_query: Query for linkifying ticket values. 72 77 * '''radio''': Radio buttons. Essentially the same as '''select'''. 73 78 * label: Descriptive label. … … 75 80 * value: Default value, one of the values from options. 76 81 * order: Sort order placement. 82 * ticketlink_query: Query for linkifying ticket values. 77 83 * '''textarea''': Multi-line text area. 78 84 * label: Descriptive label. 79 85 * value: Default text. 80 * cols: Width in columns. //(Removed in 1.1.2)//81 86 * rows: Height in lines. 82 87 * order: Sort order placement. 88 * max_size: Maximum allowed size in characters (//Since 1.3.2//). 83 89 * 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//) 85 91 * label: Descriptive label. 86 92 * value: Default date. … … 95 101 Macros will be expanded when rendering `textarea` fields with format `wiki`, but not when rendering `text` fields with format `wiki`. 96 102 103 For applicable fields, the `ticketlink_query` option 104 overrides [[TracIni#query-ticketlink_query-option|"[query] ticketlink_query"]], and the format is the same as 105 that option. When the `ticketlink_query` option 106 is not specified, `[query]` `ticketlink_query` is used to 107 linkify the field. 108 97 109 === Sample Configuration 98 110 … … 119 131 test_five = radio 120 132 test_five.label = Radio buttons are fun 121 test_five.options = uno|dos|tres|cuatro|cinco133 test_five.options = |uno|dos|tres|cuatro|cinco 122 134 test_five.value = dos 123 135 … … 144 156 }}} 145 157 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`). 147 159 148 160 === Reports Involving Custom Fields … … 178 190 Note in particular the `LEFT OUTER JOIN` statement here. 179 191 180 Note that if your config file uses an '''uppercase''' name:192 Note that option names in trac.ini are case-insensitive, so even if your option name includes uppercase characters: 181 193 {{{#!ini 182 194 [ticket-custom] 183 184 195 Progress_Type = text 185 196 }}} 186 you woulduse '''lowercase''' in the SQL: `AND c.name = 'progress_type'`.197 you must use '''lowercase''' in the SQL: `AND c.name = 'progress_type'`. 187 198 188 199 ----