List components in a wiki page - or displaying a report's output in a wiki page
I want to list all components we have in our trac system on a wiki page - any ideas? I have written a report that lists them (using distinct etc. so they only display once) - can I use this?
Part 2 - we have a custom field of "client", I then want to, on a client's wi开发者_如何学运维ki page, list just the components that have been used in tickets for that client - again I could do this in a report but how do I get that to display on a wiki page?
Thanks,
Amy
If you can do it in a report, you can do it in a wiki page. Use the [[TicketQuery]]
macro to insert a report/query into a wiki page. For example the following macro
[[TicketQuery(client=ClientA,group=component)]]
would display a list of tickets that were assigned to ClientA, grouped by component. See WikiMacros for more information about using this macro.
If you need to do more advanced queries, you can use plugins like the SqlQueryMacro or WikiTableMacro to allow you to write query the database directly (there are probably other plugins that do this sort of thing as well, these are just the ones that I can remember offhand).
To generate a list of your project's components, try the ComponentsProcessorMacro.
You can convert the report to a query and integrate that in the wiki page, see for example TracQuery - Customizing the table format
[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]
精彩评论