incubator-bloodhound-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1351389&view=rev
Log:
dashboard: tweaks to checks for valid fields in TicketFieldValuesWidget - towards #76 (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=1351389&r1=1351388&r2=1351389&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py Mon Jun
18 15:40:24 2012
@@ -111,7 +111,7 @@ class TicketFieldValuesWidget(WidgetBase
                 field_maps = {'type': {'admin_url': 'type',
                                        'title': 'Types',
                                        },
-                              'status': {'admin_url': 'status',
+                              'status': {'admin_url': None,
                                          'title': 'Statuses',
                                          },
                               'priority': {'admin_url': 'priority',
@@ -133,12 +133,12 @@ class TicketFieldValuesWidget(WidgetBase
                                              'title': 'Resolutions',
                                              },
                               }
-                if fieldnm in field_maps.keys():
-                    if 'TICKET_ADMIN' in req.perm:
+                if fieldnm in field_maps:
+                    admin_suffix = field_maps.get[fieldnm]['admin_url']
+                    if 'TICKET_ADMIN' in req.perm and admin_suffix is not None:
                         hint = _('You can add one or more '
                                  '<a href="%(url)s">here</a>',
-                                url=req.href.admin('ticket', 
-                                            field_maps[fieldnm]['admin_url']))
+                                url=req.href.admin('ticket', admin_suffix))
                     else:
                         hint = _('Contact your administrator for further details')
                     return 'widget_alert.html', \



Mime
View raw message