> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 24.04.2013 02:19, Chris wrote:
> > I'm generating a report with the following query:
> > 
> > SELECT owner as id, 
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND 
> status = 'new')
> > as New,
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND status =
> > 'assigned') as Assigned,
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND status =
> > 'fixed') as Fixed,
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND status =
> > 'verified') as Verified,
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND status =
> > 'closed') as Closed,
> > (SELECT count(*) FROM ticket b WHERE b.owner=a.owner AND status =
> > 'hold') as Hold
> > FROM ticket a
> > WHERE status <> ''
> > GROUP BY owner
> > 
> > Which gives me something like:
> > 
> > Id      | New  | Assigned | Fixed  | Verified | Closed | Hold 
> > ---------------------------------------------------------------
> > #user1  |    8 |     0    |  14    |   2      |   2    |  12
> > #user2  |    2 |    10    |   1    |   0      |   5    |   2
> > #user3  |   18 |     5    |   4    |   0      |   8    |   5
> > #user4  |    1 |     1    |   0    |   1      |   1    |   0
> > 
> > Is there a way to get the "#user1" to lose the "#" symbol and link
> > somewhere useful?

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Steffen Hoffmann
> Sent: 28 April 2013 23:01
> To: [email protected]
> Subject: Re: [Trac] Non-ticket reports with the # sign prepended
> 
> While I've to guess, I'm still pretty sure, that the 'owner 
> as id' makes
> your owners become formatted like ticket numbers. If you just drop the
> 'as id' the extra '#' should vanish.
> 
> On the second request there's not much to be done. There could be a
> sensible query showing user's ticket, but TracReports have not magic
> that I know of to create such links in the query output. It might be
> done by a simple Trac plugin, that mangles and rewrites the template
> after it got rendered (see post_process_request of 
> IRequestFilter [1]).
> 
> Steffen Hoffmann
> 
> 
> [1]
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter

One way you could do this is to run your own macro that you can then plonk on a 
wiki page.  Take a look at the UserStats macro at trac-hacks.org [1] which does 
something similar and I think could be easily adapted.

~ mark c

[1] http://trac-hacks.org/wiki/UserStatsMacro

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to