TracQuery change column names for table format

10 views
Skip to first unread message

David Grilli

unread,
Oct 28, 2019, 12:27:19 PM10/28/19
to Trac Users
Is there a way to change the label used for each column when using the table format for TracQuery?

For example, if I use col=id, the column label is "Ticket".  I'd like to change it to something else for my Query (i.e. "Case").

I think you can do this with TracReports instead but I have a few custom fields and it becomes somewhat of a laborious exercise to left join every single one of those.  I also lose the magic formatting (where it links to the ticket) if I say SELECT id AS Case instead of SELECT id AS ticket which adds even more work.

RjOllos

unread,
Oct 28, 2019, 7:32:08 PM10/28/19
to Trac Users
There's no direct support for changing the label of query results.

For Trac 1.2.x and earlier you could implement an ITemplateStreamFilter plugin to modify the label. For all Trac versions, you could add some site-specific JavaScript, either using a plugin or through interface customization hooks (1).


- Ryan
Reply all
Reply to author
Forward
0 new messages