X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/blobdiff_plain/776bd957124c1dfcde2890f989815d823b709c59..a7c202e35cf46295abd47908631b8e3669a096e2:/TracZephyrPlugin/ZephyrPlugin.py diff --git a/TracZephyrPlugin/ZephyrPlugin.py b/TracZephyrPlugin/ZephyrPlugin.py index aeaec98..673c339 100644 --- a/TracZephyrPlugin/ZephyrPlugin.py +++ b/TracZephyrPlugin/ZephyrPlugin.py @@ -22,6 +22,9 @@ class ZephyrPlugin(Component): opcode = self.config.get('ZephyrPlugin', 'opcode') if opcode: command += ['-O', opcode] + signature = self.config.get('ZephyrPlugin', 'signature') + if signature: + command += ['-s', signature] p = subprocess.Popen(command + ['-c', zclass, '-i', 'trac-#%s' % id], @@ -38,8 +41,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)