Include ticket type in zephyrs for non-defects
authorJonathan Reed <jdreed@mit.edu>
Wed, 23 Feb 2011 18:29:03 +0000 (13:29 -0500)
committerJonathan Reed <jdreed@mit.edu>
Wed, 23 Feb 2011 18:29:03 +0000 (13:29 -0500)
TracZephyrPlugin/ZephyrPlugin.py

index aeaec986f583dc3c9347892a966b34e33f4c4d0b..8daedd18102d71338c746c270071c6a024a71049 100644 (file)
@@ -38,8 +38,12 @@ class ZephyrPlugin(Component):
         return '\n'.join(lines)
     
     def ticket_created(self, ticket):
-        message = "%s filed a new %s ticket:\n%s\n\n%s" % (ticket['reporter'],
+        ttype='ticket'
+        if ticket['type'] != 'defect':
+            ttype=ticket['type']
+        message = "%s filed a new %s %s:\n%s\n\n%s" % (ticket['reporter'],
                                                            ticket['priority'],
+                                                           ttype,
                                                            ticket['summary'],
                                                            self.format_text(ticket['description']))
         self.zwrite(ticket.id, message)