Commits

g...@13f79535-47bb-0310-9956-ffa450edef68  committed deba864 Draft

allow the activity area of tickets to discover events associated with the ticket - towards #94

  • Participants
  • Parent commits dd1e73a

Comments (0)

Files changed (1)

File bhdashboard/widgets/timeline.py

                     'precision' : precision,
                     'user' : user
                 }
+            if filters:
+                fakereq.args.update(dict((k, True) for k in filters))
             if start is not None:
                 fakereq.args['from'] = start.strftime('%x %X')
 
         """
         if context.resource is not None:
             field_name = context.resource.realm
-            if field_name in self.fields:
+            if field_name in self.fields.union(['ticket']):
                 try:
                     ticket_ids = event[3][0]
                 except:
                         t = t.id
                     if isinstance(t, (int, basestring)):
                         t = ticket_cache.get(t) or Ticket(self.env, t)
+                    if field_name == 'ticket':
+                        if t.id == context.resource.id:
+                            return event
                     if t[field_name] == context.resource.id:
                         return event
                     ticket_cache[t.id] = t