Edgewall Software

Changes between Version 40 and Version 41 of TracTicketsCustomFields


Ignore:
Timestamp:
Mar 6, 2022, 9:18:25 AM (4 months ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketsCustomFields

    v40 v41  
    11= Custom Ticket Fields
     2
    23Trac supports adding custom, user-defined fields to the ticket module. With custom fields you can add typed, site-specific properties to tickets.
    34
     
    1617
    1718=== Field Names
     19
    1820A 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.
    1921
     
    154156SELECT p.value AS __color__,
    155157   id AS ticket, summary, owner, c.value AS progress
    156   FROM ticket t, enum p, ticket_custom c
    157   WHERE status IN ('assigned') AND t.id = c.ticket AND c.name = 'progress'
    158 AND p.name = t.priority AND p.type = 'priority'
    159   ORDER BY p.value
     158FROM ticket t, enum p, ticket_custom c
     159WHERE status IN ('assigned') AND t.id = c.ticket AND c.name = 'progress'
     160  AND p.name = t.priority AND p.type = 'priority'
     161ORDER BY p.value
    160162}}}
    161163'''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.
     
    170172   reporter AS _reporter,
    171173   (CASE WHEN c.value = '0' THEN 'None' ELSE c.value END) AS progress
    172   FROM ticket t
    173      LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = 'progress')
    174      JOIN enum p ON p.name = t.priority AND p.type='priority'
    175   WHERE status IN ('new', 'assigned', 'reopened')
    176   ORDER BY p.value, milestone, severity, time
     174FROM ticket t
     175   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'
     177WHERE status IN ('new', 'assigned', 'reopened')
     178ORDER BY p.value, milestone, severity, time
    177179}}}
    178180