On Tuesday, May 31, 2016 at 11:32:10 AM UTC-7, Greg Troxel wrote: > > > Greg Troxel <[email protected]> writes: > > > However, the display of the field shows "True" or "False", and I find > > this unhelpful in quickly scanning the list. I'd like it to say "yes" > > or "", meaning that the display would have a blank cell if it weren't > > true. Really "True" or "" would be fine. > > I found the place to change. The following patch makes trac do what I > want. > > --- trac/ticket/query.py.orig 2016-02-20 04:53:26.000000000 +0000 > +++ trac/ticket/query.py > @@ -338,9 +338,12 @@ class Query(object): > val = from_utimestamp(val) > elif field and field['type'] == 'checkbox': > try: > - val = bool(int(val)) > + if val=='1': > + val = 'yes' > + else: > + val = '' > except (TypeError, ValueError): > - val = False > + val = 'none' > elif val is None: > val = '' > result[name] = val >
You could implement the logic in an IRequestFilter to avoid problems and upgrade pain when running a patched version of the Trac soruce. https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter - Ryan -- 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 https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
