summaryrefslogtreecommitdiff
path: root/engines/support/app/designs/ticket/by_includes_post_by.js
blob: 2eeac891e2afae7486675745ee0c274bbc07b20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// TODO: This view is only used in tests--should we keep it?
function(doc) {
  var arr = {}
  if (doc['type'] == 'Ticket' && doc.comments) {
    doc.comments.forEach(function(comment){
      if (comment.posted_by && !arr[comment.posted_by]) {
        //don't add duplicates
        arr[comment.posted_by] = true;
        emit(comment.posted_by, 1);
      }
    });
  }
}