         type: issue_type.id
         priority: priority.id
         summary: summary
-      if msg.message.user['jira_username']?
-        issue['reporter'] = msg.message.user['jira_username']
       JiraRPC.call 'createIssue', [issue], (error, response) ->
-        if response then msg.send "#{JiraSettings.host}browse/#{response.key}" else msg.send "Couldn't make the ticket."
+        if response
+          addReporter(response)
+        else
+          msg.send "Couldn't make the ticket."
 
     getIssueType = (key, summary, project, priority) ->
       JiraRPC.call 'getIssueTypesForProject', [project.id], (error, response) ->

      if error then msg.send "Adding comment failed: #{error}" else msg.send "Added comment to #{response.key}"

  robot.respond /jira new (\w+) (.+)/i, (msg) ->
  # addReporterComment = (response) ->
  #         JiraRPC.call 'addComment', [response.key, "Added via Jabber from #{msg.message.user.name}"], (error, response) ->
  #                 if error then msg.send "Adding comment failed, but..."
  #                 msg.send "#{JiraSettings.host}browse/#{response.key}"

    createIssue = (key, summary, project, priority, issue_type) ->
      issue =

    JiraRPC.call 'login', [JiraRPC.username, JiraRPC.password], (error, response) ->
      if error then msg.send "ERROR: #{error}" else msg.send "JIRA A-OK BOSS"

  # robot.respond /jira current version (.*)/i, (msg) ->
  #   robot.brain.data.jira ?= {}
  #   robot.brain.data.jira['current_version'] = msg.match[1]
  #   msg.send "Got it. New issues will be added to #{robot.brain.data.jira['current_version']}."

  # robot.respond /jira set username (\S+)/i, (msg) ->
  #   msg.message.user['jira_username'] = msg.match[1]
  #   msg.reply "Got it, #{msg.message.user['jira_username']}."

  # robot.respond /jira (\w+-\d+) reporter (\S+)/i, (msg) ->
  #         remote_field_value =
  #                 id: 'reporter'
  #                 value: msg.match[2]
  #         update = [msg.match[1], ['RemoteFieldValue':remote_field_value]]
  #         msg.send update
  #         JiraRPC.call 'updateIssue', update, (error, response) ->
  #                if response then msg.send "updated reporter of #{response.key} to #{response.reporter}" else msg.send "Changing reporter failed: #{error}"

  robot.respond /jira (\w+-\d+) comment (.*)/i, (msg) ->
    comment =
