Why is this workflow sending me about 30 emails each morning instead of

There are lots of things wrong with this workflow, but the first one I'm trying to figure it is why it sends me about 30 emails instead of the 1 I anticipated.  The notify is not inside any loops.

daily at 8:00:00 [project=={Agile Implementation}] {
 var output = "Daily Totals: <br>";
 var group = {group:All Users};
 for each u in group.getUsers( ){
  var openIssues = u.getIssues(Everything,"Assignee:"+u);
  var openIssuesCount = 0;
  var InProgressIssuesCount = 0;
  for eachiinopenIssues {
   if(State=={In Progress}){
  output=output+InProgressIssuesCount+"In Progress<br>";
 var usr=project.getUser("Scott");
 usr.notify("Daily Report (test)",output);

Sorry it looks like crap, that's how it copies from the youtrack web interface and I can't copy from the workflow editor, so... at least I added some indentations

edit: okay I went back and added some spaces to make it more readable.


Please sign in to leave a comment.