Trac Attachments

Richard Laager rlaager at wiktel.com
Sun Jun 8 03:34:34 EDT 2008


On Thu, 2008-06-05 at 18:37 -0400, Daniel Atallah wrote:
> On Thu, Jun 5, 2008 at 6:28 PM, Richard Laager <rlaager at wiktel.com> wrote:
> > On Mon, 2008-06-02 at 22:51 -0400, Daniel Atallah wrote:
> >> 2008/6/2 Richard Laager <rlaager at wiktel.com>:
> >> > Is there a way to find all the tickets with attachments? I'd like to
> >> > make a pass to find patches on tickets that are not flagged as patches.
> >>
> >> The easiest way I can see to do this is with a query against the
> >> postgres DB running trac:
> >
> > Do you know how I might do that? Or, have you already done this? I saw
> > you changed the type of a few tickets.
> 
> I already did it, but you can go ahead and do it again and maybe look
> more carefully:

I made a pass through these and here's an updated shell command (which
is mostly SQL... and mostly your SQL at that) to do the whole thing.

        echo "
        select t.id, a.filename, a.size
          from trac_pidgin.ticket t, trac_pidgin.attachment a
         where t.type IN ('defect', 'enhancement')
           and a.type = 'ticket'
           and a.id = t.id
           and t.status <> 'closed'
           and UPPER(a.filename) NOT LIKE '%.RPT'
           and UPPER(a.filename) NOT LIKE '%.PNG'
           and UPPER(a.filename) NOT LIKE '%.JPG'
           and UPPER(a.filename) NOT LIKE '%.JPEG'
           and UPPER(a.filename) NOT LIKE '%.LOG'
           and t.id NOT IN (34, 35)
        order by id;
        " | sudo -u postgres psql trac

If you run this in the future, you probably want to add "and t.id >
6040" to exclude all the tickets we've already looked at. I realize that
makes some assumptions about people not breaking things in the future.

Do you think it would be valuable to have this run (weekly?) and
e-mailed to the devel list? It seems that might help us catch patches
that aren't marked as such. Along the same lines, should we do any sort
of e-mail notices about patches needing review?

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20080608/e14dd54a/attachment.sig>


More information about the Devel mailing list