command = shlex.split(self.config.get('ZephyrPlugin', 'command').encode('utf-8'))
if not command:
command = ['zwrite', '-q', '-l', '-d']
+ 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],
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)