Allow auto-query-linking of custom text fields
|Reported by:||Owned by:|
TracTicketsCustomFields support two new formats for text fields,
When viewing a ticket, Trac creates "autoquery links" for all of the built-in ticket fields in the
.properties table. This lets the user click on the text of (e.g.) the "priority" value to land on a Custom Query page showing all open tickets with the same priority as the ticket he was just viewing.
This autoquery-linking behavior is active for built-in fields. It is also active for custom fields, depending on the type of the field. It is enabled for custom "select", "checkbox" and "radio" fields, but it is not enabled for custom "text" or "textarea" fields.
Per discussion on trac-users it can be useful to enable autoquery-linking for custom "text" fields in some scenarios. Currently Trac provides no built in way to do this: it can only be done by implementing a plugin that provides a Genshi stream filter.
The attached patch allows users to turn on autoquery-linking for custom "text" and "textarea" fields. Per discussion on #7562 and #1791, this configuration does not introduce a new Option. Instead, it reuses the
field introduced in , because it does not make sense for a field to be both auto-linked and wiki-formatted.
values are introduced. To turn on standard autoquery-linking for a custom field, the user does this:
[ticket-custom] foobar = text foobar.label = The foo dazzle foobar.value = "" foobar.format = querylink
The user can also turn on "keyword-style" autoquery-linking for a custom field. This makes a separate query-link for each word in the field's value, in the same way that the built-in "keyword" field does:
[ticket-custom] foobar = text foobar.label = The foo dazzle foobar.value = "" foobar.format = querylinkwords