     .catch (error) ->
       send msg, "An error has occured: #{error}"
 
-  handleRankRequest = (msg) ->
-    msg.finish()
+  handleRankRequest = (msg, includeAttachment=yes) ->
+    msg.finish?()
     [ __, ticket, direction ] = msg.match
     ticket = ticket.toUpperCase()
     direction = direction.toLowerCase()


  robot.hear transitionRegex, handleTransitionRequest if transitions
  robot.hear rankRegex, handleRankRequest
  robot.hear assignRegex, handleAssignRequest
  robot.hear commentRegex, addComment


    .then (json) ->
      issue.key = json.key
      send msg,
        text: TICKET_CREATED_TEXT
        attachments: [ buildJiraAttachment issue, no ]

      if toState
