<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#964;&#949;&#967;&#957;&#959;&#963;&#959;&#966;&#953;&#945; &#187; SQL</title>
	<atom:link href="http://lackoftalent.org/michael/blog/category/development/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://lackoftalent.org/michael/blog</link>
	<description>The occasional rambling of a digital library artisan</description>
	<lastBuildDate>Mon, 10 Oct 2011 12:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Useful Trac reports?</title>
		<link>http://lackoftalent.org/michael/blog/2007/01/16/useful-trac-reports/</link>
		<comments>http://lackoftalent.org/michael/blog/2007/01/16/useful-trac-reports/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 21:54:55 +0000</pubDate>
		<dc:creator>Michael Giarlo</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://lackoftalent.org/michael/blog/2007/01/16/useful-trac-reports/</guid>
		<description><![CDATA[I had to create some Trac reports a while back, and figured I would share them with the world wide (time)waste. The first selects all completed milestones: SELECT name, date(completed, 'unixepoch') as Completed, date(due, 'unixepoch') as Due, description FROM milestone WHERE completed > 1 ORDER BY completed DESC And the second lists all of your [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="oai:lackoftalent.org:technosophia:71"><!-- &nbsp; --></abbr>
<p>I had to create some Trac reports a while back, and figured I would share them with the world wide (time)waste.</p>
<p>The first selects all completed milestones:</p>
<pre>SELECT name,
    date(completed, 'unixepoch') as Completed,
    date(due, 'unixepoch') as Due,
    description
FROM milestone
WHERE completed > 1
ORDER BY completed DESC</pre>
<p>And the second lists all of your closed tickets:</p>
<pre>SELECT p.value AS __color__,
    (CASE status
        WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;'
        ELSE
            (CASE owner WHEN '$USER' THEN 'font-weight: bold' END)
    END) AS __style__,
    id AS ticket, summary, component, version, milestone,
    t.type AS type, severity, priority, time AS created,
    changetime AS _changetime, description AS _description,
    reporter AS _reporter
FROM ticket t, enum p
WHERE status IN ('closed') AND p.name = t.priority AND p.type = 'priority' AND owner = '$USER'
ORDER BY (status = 'assigned') DESC, p.value, milestone, severity, time</pre>
<p>They were pretty easy to whip up based on the other reports, but I figured I might save someone else a few minutes by sharing.  For all that I&#039;ve <strike>plagiarized</strike> borrowed from the web, it&#039;s time to pay that karma down a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://lackoftalent.org/michael/blog/2007/01/16/useful-trac-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

