Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D58A9D4E for ; Mon, 18 Jun 2012 10:59:04 +0000 (UTC) Received: (qmail 24704 invoked by uid 500); 18 Jun 2012 10:59:04 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 24680 invoked by uid 500); 18 Jun 2012 10:59:04 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 24670 invoked by uid 99); 18 Jun 2012 10:59:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 10:59:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 10:59:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D8B0F2388C72; Mon, 18 Jun 2012 10:58:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1351291 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py Date: Mon, 18 Jun 2012 10:58:40 -0000 To: bloodhound-commits@incubator.apache.org From: gjm@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120618105840.D8B0F2388C72@eris.apache.org> 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 :