Trying to itterate through all issues assigned to specific user

These if statements don't seem to trigger.  Does anyone see any reason why?  

var uIssues = u.getIssues(Everything,"Assignee:Scott");
var openIssuesCount = 0;
var InProgressIssuesCount = 0;
for each i in uIssues {
  if (i.State == {Open} ) {
  if (i.State == {In Progress}) {
   InProgressIssuesCount = InProgressIssuesCount + 1;

openIssuesCount and InProgressIssuesCount always equal 0, but I know there are issues in these states.

I tried comparing i.State to the following
  • {State: Open}
  • "Open"
  • {Open}

None of these works.
Comment actions Permalink
Please try to include the debug print:
- message("State: " +; - it'll show the message on the full issue screen for the stateless rule/state machine
- debug("State: " +; - it'll print the message to the youtrack.log/workflow.log for all kind of rules
Comment actions Permalink
I actually found out the problem was a silly error further up in my code.  The debugging helped me find it though, so I'll mark that as the answer.

Please sign in to leave a comment.