     comments[0].should_show_timestamp = true
 
     for i in [0...comments.length]
+      # If the comment is a reply to an earlier comment
+      if comments[i].reply_to?
+        comments[i].original_comment = $filter('filter')(comments, {'id':comments[i].reply_to})[0]
+
       initials = comments[i].author.name.split(" ")
       comments[i].initials = ("#{initials[0][0]}#{initials[1][0]}").toUpperCase()
       comments[i].author_is_me = comments[i].author.id == currentUser.profile.id

    form = new FormData()
    form.append 'attachment', media

    TaskComment.create_media {project_id: task.project().project_id, task_definition_id: task.task_definition_id}, form,
      (response) -> #success
        unless task.comments?
          task.comments = []


  #============================================================================
  #ADD COMMENT
  taskService.addComment = (task, textString, commentType, replyID, success, failure) ->
    TaskComment.create { project_id: task.project().project_id, task_definition_id: task.task_definition_id, comment: textString, type: commentType, reply_to: replyID},
      (response) ->
        unless task.comments?
          task.comments = []
