On 11/01/2013, at 9:44 PM, Richard Hipp <[email protected]> wrote: > The "status" field is coming from the ticket table and thus shows the latest > status. To show the latest status at some point in the past, you need a (I > think) to first add a "status" field to your "ticketchng" table definition. > Then modify the query to be something like this (untested): > > > SELECT DISTINCT > date(ticket.tkt_mtime), > substr(tkt_uuid,1,10) AS '#', > (SELECT status FROM tkt_chng AS chng2 > WHERE chng2.tkt_id = ckc1.tkt_id > AND chng2.tkt_time <= chng1.tkt_time > AND chng2.status IS NOT NULL > ORDER BY chng2.tkt_time DESC LIMIT 1), > login, > title > FROM ticket AS tkt1 LEFT OUTER JOIN ticketchng AS chng1 > ON tkt1.tkt_id = chng1.tkt_id > ORDER BY tkt1.tkt_mtime desc
Excellent, thx. That shows me a way forward. > Later today, I'll try to find time to enhance Fossil so that you can > accomplish the above merely by creating a "status" column in the TICKETCHNG > table and omitting the subquery. Even better. > On Fri, Jan 11, 2013 at 3:07 AM, Steve Landers <[email protected]> > wrote: >> I'm implementing a "Changed Tickets" report similar to that in Fossil's >> ticket system, the main difference is I want to show who made the change. I >> do this by joining ticket and ticketchg > > How is the /timeline?y=t page is insufficient for this? It's not tabular and not easily configurable (color, number of entries or recent entries by time, order/sorting/format of columns, etc). Plus, I've added sortable columns via javascript. So, the information is there but not as accessible. Thanks again Richard. As always, much appreciated. Steve _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

