@responder(pattern="^issues$", form='issues', help='List all open issues')
def issues(conversation):
  issues = sorted([i for i in Issue.objects if not i.resolved], key=lambda i: i.id)
  summaries = []
  for issue in issues:
    summary = "%d: %s" % (issue.id, issue.description)
    if issue.context['agent']:
      summary += issue.context['agent'].name % " (%s is troubleshooting)"
    elif isinstance(issue.context['assignedTo'], SupportAgent):
      summary += " (assigned to %s)" % issue.context['assignedTo'].name
    elif issue.context['assignedTo'] is None:
      summary += " (unassigned)"
    summaries.append(summary)

  heading = 'There are %d open issues\n' % len(issues)
  listing = '\n'.join(summaries)
  conversation.say(heading + listing, useHTML=False)
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/responders/support.py/issues/swapped operands of `%`