You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/06/18 12:58:40 UTC

svn commit: r1351291 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py

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 :