[Trac] Re: Use timestamp from when ticket was closed in TicketQuery macro
Another way of doing is to add a closedate field to the ticket table and put a trigger on the ticket_change table. Then you can get all your info from the ticket table. On Mar 1, 3:27 pm, RjOllos wrote: > On Mar 1, 8:48 am, MC wrote: > > > The information is stored in ticket_change table: > > > select * from ticket_change where newvalue='closed' order by timestamp > > desc limit 0,5; > > > Does this help? > > Yes, thank you. I'll give it a try ... the only catch is that I can't > see a way to do this with the TicketQuery macro, so I guess I'll have > to use the SqlQuery macro. -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
[Trac] Re: Use timestamp from when ticket was closed in TicketQuery macro
On Mar 1, 8:48 am, MC wrote: > The information is stored in ticket_change table: > > select * from ticket_change where newvalue='closed' order by timestamp > desc limit 0,5; > > Does this help? Yes, thank you. I'll give it a try ... the only catch is that I can't see a way to do this with the TicketQuery macro, so I guess I'll have to use the SqlQuery macro. -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
[Trac] Re: Use timestamp from when ticket was closed in TicketQuery macro
The information is stored in ticket_change table: select * from ticket_change where newvalue='closed' order by timestamp desc limit 0,5; Does this help? Marjeta On Mar 1, 2:59 am, Ryan J Ollos wrote: > Hello, > > I'm trying to create a list of tickets on my Trac homepage that shows > "Recently completed tickets". I'm using the following TicketQuery macro > arguments: > > [[TicketQuery(format=list, max=5, status=closed, resolution=fixed, > desc=True, order=changetime)]] > > The problem here is that, since I'm ordering by changetime, a ticket that is > updated after it is closed is bumped to the top of the list. I'd like to > order by the timestamp from when the ticket was closed. > > I seem to remember some discussion on this mailing list about the timestamps > for ticket transitions being stored in the DB, and I'm assuming the > discussion was about the ticket_change table [1]. > > Of course, if the value is not stored in the ticket table, then I can't see > how I could use the TicketQuery macro ... but could probably use the > WikiTable or SqlQuery macro. > > Any ideas of how I might accomplish this with just the TicketQuery macro? > > Any help is greatly appreciated. Thanks! > > [1]http://trac.edgewall.org/wiki/TracDev/DatabaseSchema > -- > View this message in > context:http://old.nabble.com/Use-timestamp-from-when-ticket-was-closed-in-Ti... > Sent from the Trac Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.