[wp-hackers] Finding bugs to fix on Trac

Mark Jaquith mark.wordpress at txfx.net
Mon Feb 26 05:54:09 GMT 2007

On Feb 25, 2007, at 10:04 PM, Jennifer Hodgdon wrote:

> Actually, I don't think the new query is working.  At the moment,
>     http://trac.wordpress.org/report/18
> is returning at least 2 bugs that do have attachments:
> http://trac.wordpress.org/ticket/3873
> http://trac.wordpress.org/ticket/3868
> The SQL you posted earlier looks OK... not sure what is happening,  
> but is that the SQL actually being used for the report? It looks to  
> me as though Report 18 is giving the exact same results as Report 13.

My SQL wasn't quite right.  This is what I have now:

> SELECT (CASE WHEN keywords LIKE '%%needs-patch%%' THEN 'background:  
> #ffcc66;' ELSE '' END) AS __style__,
> 	t.id AS ticket,
> 	t.summary as summary,
> 	t.type AS type,
> 	t.severity as severity,
> 	(CASE t.status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS  
> owner,
> 	t.time AS created,
> 	changetime AS _changetime,
> 	t.description AS _description,
> 	reporter AS _reporter
> FROM ticket t, enum p
> LEFT JOIN attachment a
> 	ON t.id = a.id
> 	(a.id IS NULL OR t.keywords LIKE '%%needs-patch%%')
> 	AND (a.type = 'ticket' OR a.type IS NULL)
> 	AND status IN ('new', 'assigned', 'reopened')
> 	AND p.name = t.priority
> 	AND p.type = 'priority'
> GROUP BY t.id
> ORDER BY t.time DESC

http://trac.wordpress.org/ticket/2275 is an example of a ticket that  
has a patch, but is still on the report because the patch wasn't  
satisfactory, and I manually marked it as "needs-patch"

Mark Jaquith

Covered Web Services

More information about the wp-hackers mailing list