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 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.

Attachment: signature.asc
Description: PGP signature

Reply via email to