Author: astaric
Date: Tue Jul 23 11:25:13 2013
New Revision: 1505980
URL: http://svn.apache.org/r1505980
Log:
Reverted r1505666.
It causes additional problems when default_product is set in config. Original
issue will need to be solved by
patching sql translator. Refs #601
Modified:
bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1505980&r1=1505979&r2=1505980&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Tue Jul 23 11:25:13 2013
@@ -550,15 +550,11 @@ class QuickCreateTicketDialog(Component)
PS: Borrowed from XmlRpcPlugin.
"""
- attrs = dict(attributes)
- product = attrs.pop('product', '')
- env = self._get_env(product)
-
- t = Ticket(env)
+ t = Ticket(self.env)
t['summary'] = summary
t['description'] = description
t['reporter'] = req.authname
- for k, v in attrs.iteritems():
+ for k, v in attributes.iteritems():
t[k] = v
t['status'] = 'new'
t['resolution'] = ''
@@ -566,21 +562,12 @@ class QuickCreateTicketDialog(Component)
if notify:
try:
- tn = TicketNotifyEmail(env)
+ tn = TicketNotifyEmail(self.env)
tn.notify(t, newticket=True)
except Exception, e:
self.log.exception("Failure sending notification on creation "
"of ticket #%s: %s" % (t.id, e))
- return product, t.id
-
- def _get_env(self, product):
- global_env = self.env.parent or self.env
- if product:
- env = ProductEnvironment(global_env, product)
- else:
- env = global_env
- return env
-
+ return t['product'], t.id
from pkg_resources import get_distribution
application_version = get_distribution('BloodhoundTheme').version