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.
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.
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=={Open}){ openIssuesCount=openIssuesCount+1; } if(State=={In Progress}){ InProgressIssuesCount=InProgressIssuesCount+1; } } output=output+u.fullName+"<vbtab>"+openIssuesCount+"open,"; 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.
Please also follow the issue JT-10724.
daily at 8:00 [time == 8:00]
???
And workflow looks like this:
to this:
It said it couldn't find issue "issue: A-1".
But it is only sending once now. Thank you.
If your project is called Agile Implementation this may need to be changed to issue: AI-1 with "AI" being whatever the "Project ID" is set to in your project.