Changes between Version 3 and Version 4 of TracTicketsCustomFields
- Timestamp:
- Jun 9, 2024, 1:47:47 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTicketsCustomFields
v3 v4 1 1 = Custom Ticket Fields 2 3 2 Trac supports adding custom, user-defined fields to the ticket module. With custom fields you can add typed, site-specific properties to tickets. 4 3 … … 17 16 18 17 === Field Names 19 20 18 A field name can only contain lowercase letters a-z, uppercase letters A-Z or digits 0-9, and must not start with a leading digit. 21 19 … … 64 62 * `reference` to treat the content as a queryable value 65 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`. 66 66 * '''checkbox''': A boolean value check box. 67 67 * label: Descriptive label. 68 68 * value: Default value, 0 or 1. 69 69 * order: Sort order placement. 70 * ticketlink_query: Query for linkifying ticket values. 70 71 * '''select''': Drop-down select box. Uses a list of values. 71 72 * label: Descriptive label. … … 73 74 * value: Default value (one of the values from options). 74 75 * order: Sort order placement. 76 * ticketlink_query: Query for linkifying ticket values. 75 77 * '''radio''': Radio buttons. Essentially the same as '''select'''. 76 78 * label: Descriptive label. … … 78 80 * value: Default value, one of the values from options. 79 81 * order: Sort order placement. 82 * ticketlink_query: Query for linkifying ticket values. 80 83 * '''textarea''': Multi-line text area. 81 84 * label: Descriptive label. … … 97 100 98 101 Macros will be expanded when rendering `textarea` fields with format `wiki`, but not when rendering `text` fields with format `wiki`. 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. 99 108 100 109 === Sample Configuration … … 156 165 SELECT p.value AS __color__, 157 166 id AS ticket, summary, owner, c.value AS progress 158 FROM ticket t, enum p, ticket_custom c159 WHERE status IN ('assigned') AND t.id = c.ticket AND c.name = 'progress'160 161 ORDER BY p.value167 FROM ticket t, enum p, ticket_custom c 168 WHERE status IN ('assigned') AND t.id = c.ticket AND c.name = 'progress' 169 AND p.name = t.priority AND p.type = 'priority' 170 ORDER BY p.value 162 171 }}} 163 172 '''Note''': This will only show tickets that have progress set in them. This is '''not the same as showing all tickets'''. If you created this custom ticket field ''after'' you have already created some tickets, they will not have that field defined, and thus they will never show up on this ticket query. If you go back and modify those tickets, the field will be defined, and they will appear in the query. … … 172 181 reporter AS _reporter, 173 182 (CASE WHEN c.value = '0' THEN 'None' ELSE c.value END) AS progress 174 FROM ticket t175 LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = 'progress')176 JOIN enum p ON p.name = t.priority AND p.type ='priority'177 WHERE status IN ('new', 'assigned', 'reopened')178 ORDER BY p.value, milestone, severity, time183 FROM ticket t 184 LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = 'progress') 185 JOIN enum p ON p.name = t.priority AND p.type='priority' 186 WHERE status IN ('new', 'assigned', 'reopened') 187 ORDER BY p.value, milestone, severity, time 179 188 }}} 180 189