Index: trac/ticket/web_ui.py =================================================================== --- trac/ticket/web_ui.py (revision 7302) +++ trac/ticket/web_ui.py (working copy) @@ -26,7 +26,7 @@ from genshi.builder import tag from trac.attachment import AttachmentModule -from trac.config import BoolOption, Option, IntOption, _TRUE_VALUES +from trac.config import BoolOption, Option, IntOption, ListOption, _TRUE_VALUES from trac.core import * from trac.mimeview.api import Mimeview, IContentConverter, Context from trac.resource import Resource, get_resource_url, \ @@ -105,6 +105,10 @@ If set to 'default', this is equivalent to 'yes' for new environments but keeps the old behavior for upgraded environments (i.e. 'no'). (''since 0.11'').""") + + excluded_fields = ListOption('ticket', 'excluded_fields', + default=['estimatedhours', 'hours', 'totalhours'], + doc="fields to exclude from AutoQuery markup") # IContentConverter methods @@ -557,10 +561,20 @@ if preserve_newlines == 'default': preserve_newlines = self.env.get_version(initial=True) >= 21 # 0.11 preserve_newlines = preserve_newlines in _TRUE_VALUES + + def query_link(x, y): + query = req.href('query', **{x:y}) + args = self.env.config.get('query', 'default_anonymous_query') + if args: + query = '%s&%s' % (query, args) + return query + return {'ticket': ticket, 'context': Context.from_request(req, ticket.resource, absurls=absurls), - 'preserve_newlines': preserve_newlines} + 'preserve_newlines': preserve_newlines, + 'query_link': query_link, + 'excluded_fields': self.excluded_fields } def _toggle_cc(self, req, cc): """Return an (action, recipient) tuple corresponding to a change Index: trac/ticket/templates/ticket.html =================================================================== --- trac/ticket/templates/ticket.html (revision 7302) +++ trac/ticket/templates/ticket.html (working copy) @@ -44,6 +44,7 @@ + $prefix$cnum @@ -135,9 +136,16 @@ not in ('type', 'owner')]"> Reported by: - ${authorinfo(ticket.reporter)} + + + ${authorinfo(ticket.reporter)} + + Owned by: - ${ticket.owner and authorinfo(ticket.owner) or ''} + + + ${ticket.owner and authorinfo(ticket.owner) or ''} + ${field.rendered} - ${ticket[field.name]} + + + + + + + ${ticket[field.name]} + + + + ${ticket[field.name]} + + + +