Commits

Olemis Lang committed 840cd8d

BH Theme #250 : Fixing error in activity widget when filtering ticket attachment events

Comments (0)

Files changed (3)

bhdatawidgets/bhdash_dojo_test.diff

-# HG changeset patch
-# Parent 2f56595a9da1c5d184240be0273096b1a5a9784f
-BH Widgets : Testing Dojo widgets in dasboard view
-
-diff -r 2f56595a9da1 bhdashboard/web_ui.py
---- a/bhdashboard/web_ui.py	Tue Oct 23 23:06:13 2012 -0500
-+++ b/bhdashboard/web_ui.py	Tue Oct 23 23:35:03 2012 -0500
-@@ -150,7 +150,7 @@
-                                     '_class' : 'span8',
-                                     'widgets' : ['my tickets', 'active tickets',
-                                                  'versions', 'milestones',
--                                                 'components']
-+                                                 'components', 'dojotest']
-                                 },
-                                 {
-                                     '_class' : 'span4',
-@@ -218,6 +218,9 @@
-                     'activity': {
-                             'args' : ['Timeline', None, {'args' : {}}]
-                         },
-+                    'dojotest': {
-+                            'args' : ['DojoTutorial', None, {'args' : {}}]
-+                        },
-                }
-         }
- 
 hgsvn/rm_files.diff
-bhdatawidgets/bhdash_dojo_test.diff
+t250/t250_r1398977_timeline_filter_ticket_attachment.diff

t250/t250_r1398977_timeline_filter_ticket_attachment.diff

+# HG changeset patch
+# Parent ddaa4f97e0b327026fda40edb94ffd95004126b7
+BH Dashboard #250 : Fixing error in ticket timeline filter (attachment events)
+
+diff -r ddaa4f97e0b3 bhdashboard/widgets/timeline.py
+--- a/bhdashboard/widgets/timeline.py	Sun Nov 04 01:31:32 2012 -0500
++++ b/bhdashboard/widgets/timeline.py	Sun Nov 04 01:13:14 2012 -0500
+@@ -348,7 +348,8 @@
+                         getattr(context, '_ticket_cache', None) or {}
+                 for t in ticket_ids:
+                     if isinstance(t, Resource):
+-                        t = t.id
++                        t = t.id if event[0] != 'attachment' \
++                                else t.parent.id
+                     if isinstance(t, (int, basestring)):
+                         t = ticket_cache.get(t) or Ticket(self.env, t)
+                     if field_name == 'ticket':