trac: Include ticket summaries in body if they were truncated.

(imported from commit df1bd5e765725d077cc30ce92eac8bf694145044)
This commit is contained in:
Tim Abbott 2013-10-01 14:30:49 -04:00
parent b21b0557e8
commit 096df55436

View file

@ -80,8 +80,11 @@ class ZulipPlugin(Component):
content = "%s created %s in component **%s**, priority **%s**:\n" % \ content = "%s created %s in component **%s**, priority **%s**:\n" % \
(ticket.values.get("reporter"), markdown_ticket_url(ticket), (ticket.values.get("reporter"), markdown_ticket_url(ticket),
ticket.values.get("component"), ticket.values.get("priority")) ticket.values.get("component"), ticket.values.get("priority"))
# Include the full subject if it will be truncated
if len(ticket.values.get("summary")) > 60:
content += "**%s**\n" % (ticket.values.get("summary"),)
if ticket.values.get("description") != "": if ticket.values.get("description") != "":
content += "%s" % markdown_block(ticket.values.get("description")) content += "%s" % (markdown_block(ticket.values.get("description")),)
send_update(ticket, content) send_update(ticket, content)
def ticket_changed(self, ticket, comment, author, old_values): def ticket_changed(self, ticket, comment, author, old_values):
@ -96,7 +99,7 @@ class ZulipPlugin(Component):
content = "%s updated %s" % (author, markdown_ticket_url(ticket)) content = "%s updated %s" % (author, markdown_ticket_url(ticket))
if comment: if comment:
content += ' with comment: %s\n\n' % (markdown_block(comment,)) content += ' with comment: %s\n\n' % (markdown_block(comment),)
else: else:
content += ":\n\n" content += ":\n\n"
field_changes = [] field_changes = []