| 88 | ---- |
| 89 | You also can include the Project Name in your Ticket Queries by adding a join to "ticket_custom". |
| 90 | Example: |
| 91 | |
| 92 | {{{#!sql |
| 93 | SELECT p.value AS __color__, |
| 94 | id AS ticket, summary, |
| 95 | tc.value AS 'Project-Name', # display the Project Name in the Ticket Overview |
| 96 | version, milestone, t.type AS type, |
| 97 | owner, status, |
| 98 | time AS created, |
| 99 | changetime AS _changetime, description AS _description, |
| 100 | reporter AS _reporter |
| 101 | FROM ticket t |
| 102 | LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' |
| 103 | LEFT JOIN ticket_custom tc ON t.id = tc.ticket AND tc.name = 'project' # add the join to ticket_custom and only select the Project-Name |
| 104 | WHERE status <> 'closed' |
| 105 | ORDER BY CAST(p.value AS integer), milestone, t.type, time |
| 106 | }}} |
| 107 | |