Hi, Erik! Thanks a lot! Your tip was great.
I'll read something about SQL. Thank you. Adriano Vieira On 4/26/07, Erik Bray <[EMAIL PROTECTED]> wrote: > > Here's a sample solution for your first report. A report can > basically be any SQL select query, so I suggest reading up on SQL for > your future reporting needs. > > SELECT t.id, t.reporter, datetime(t.time, 'unixepoch', 'localtime') AS > Created, datetime(c.time, 'unixepoch', 'localtime') AS Closed, > c.author AS ClosedBy > FROM ticket t > JOIN ticket_change c ON c.ticket=t.id AND c.field = 'status' AND > c.newvalue = 'closed' AND c.time=t.changetime > ORDER BY t.id; > > On 4/26/07, Hapia IN <[EMAIL PROTECTED]> wrote: > > > > Hi, guys! > > > > We need to build some custom reports on trac, but I don't know how I > > could do it! > > > > Some of them are: > > > > > > 1) For both "create" and "closed" fields we want the date and time > > like below (or something around). > > > > Id |Reporter | Created |Closed | Closed by > > ---------------------------------------------------------------------------------- > > 1 |Pandeiro |20/02/2007 08:20|26/02/2007 18:20| Cacic > > 2 | ... | | > > | > > 3 | ... | | > > | > > > > > > 2) That same report with custom fields and filtering by those custom > > fields, as same as, filtering by create date (e.g: one day or one > > month) > > > > Id |Reporter | Created |Closed |Closed > > by|Cust Filed1|Cust Filed2 > > --------------------------------------------------------------------------------------------------------- > > 1 |Pandeiro |20/02/2007 08:20|26/02/2007 18:20| Cacic > > |CustData1|CustData2 > > 2 | ... | | > > | | | > > 3 | ... | | > > | | | > > > > > > How could we make those reports? Could you help us? > > > > Thx a lot in advance. > > > > Adriano Vieira > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
