On Mar 6, 6:15 am, "jonasn" <[EMAIL PROTECTED]> wrote: > On > > http://dev.plone.org/plone.org/wiki/TracTicketsCustomFields > > It is explained how to show one custom field in a report. Like this: > > SELECT p.value AS __color__, > id AS ticket, summary, component, version, milestone, severity, > (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS > owner, > time AS created, > changetime AS _changetime, description AS _description, > reporter AS _reporter, > (CASE WHEN c.value = '0' THEN 'None' ELSE c.value END) AS progress > FROM ticket t > LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = > 'progress') > JOIN enum p ON p.name = t.priority AND p.type='priority' > WHERE status IN ('new', 'assigned', 'reopened') > ORDER BY p.value, milestone, severity, time > > If you want to show another custom field, you just change the name of > the two places where it says progress. > > However the document doesn't give the slightest hint of how to add > more than one custom field. Has anyone figured that out ?
Yes, "you need to use a JOIN for every custom field that is in the query". Add a join for each field you need and change the alias from "c" to something unique for each join. -- Matt Good --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
