incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1351291 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py
Date Mon, 18 Jun 2012 10:58:40 GMT
Author: gjm
Date: Mon Jun 18 10:58:40 2012
New Revision: 1351291

URL: http://svn.apache.org/viewvc?rev=1351291&view=rev
Log:
dashboard: correct counter for empty values when query arg set - towards #93 (from olemis)

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py?rev=1351291&r1=1351290&r2=1351291&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py Mon Jun
18 10:58:40 2012
@@ -181,8 +181,8 @@ class TicketFieldCloudWidget(WidgetBase)
                         'Invalid ticket field for ticket groups')
             fieldnm = query.group
             sql, v = query.get_sql() 
-            sql = 'SELECT %(name)s , count(%(name)s) ' \
-                    'FROM (%(sql)s) GROUP BY %(name)s' % \
+            sql = "SELECT COALESCE(%(name)s, '') , count(COALESCE(%(name)s, ''))"\
+                    "FROM (%(sql)s) GROUP BY COALESCE(%(name)s, '')" % \
                     { 'name' : fieldnm, 'sql' : sql }
             db = self.env.get_db_cnx()
             try :



Mime
View raw message