incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1386655 - in /incubator/bloodhound/trunk: bloodhound_dashboard/bhdashboard/widgets/timeline.py bloodhound_theme/bhtheme/templates/bh_ticket.html
Date Mon, 17 Sep 2012 15:20:47 GMT
Author: gjm
Date: Mon Sep 17 15:20:47 2012
New Revision: 1386655

URL: http://svn.apache.org/viewvc?rev=1386655&view=rev
Log:
allow the activity area of tickets to discover events associated with the ticket - towards
#94

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py?rev=1386655&r1=1386654&r2=1386655&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py Mon Sep
17 15:20:47 2012
@@ -156,6 +156,8 @@ class TimelineWidget(WidgetBase):
                     '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')
 
@@ -333,7 +335,7 @@ class TicketFieldTimelineFilter(Componen
         """
         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:
@@ -349,6 +351,9 @@ class TicketFieldTimelineFilter(Componen
                         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

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1386655&r1=1386654&r2=1386655&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Mon Sep 17
15:20:47 2012
@@ -474,7 +474,11 @@ ${value}</textarea>
         </div>
       </div>
       <div py:if="bhdb" class="span4">
-        <bh:widget urn="Timeline" />
+        <bh:widget urn="Timeline">
+          <bh:args>
+            <bh:arg name="filters">ticket,ticket_details,changeset</bh:arg>
+          </bh:args>
+        </bh:widget>
       </div>
     </div>
   </body>



Mime
View raw message