title: VSTS - Widget only works for some people anod not others. What might be the issue?
body: <p>ORIGINAL POST:</p>
  
  <p>I've built a widget that works for some people in the company, but not other people and I was wondering if anyone might help me.</p>
  
  <p>For the people that it works for, it doesn't matter what computer or browser they are on, it works. While for thosethat it does not work for, it just doesn't work no matter what computer or browser they use.</p>
  
  <p>The Widget is very simple. It builds a query using the query API before plotting the result on a graph.</p>
  
  <p>The main problem seems to be that the query is returning zero result for some people, for some unknown reason.</p>
  
  <p>It doesn't seem to have anything to do with licenses or security permission as some people on stackholder licenses can see the widget, while others on basic license with project admin permission cannot.</p>
  
  <p>Any suggestions would be much appreciated.</p>
  
  <p><strong>Code</strong>:</p>
  
  <p>First, I have a method that builds the query depending on the type of query I want.</p>
  
  <pre><code>var queryString = buildWiql(queryType, dateString, iterationPath);
  </code></pre>
  
  <p>The implementation of <code>buildWiql()</code> is:</p>
  
  <pre><code>var buildWiql = function (queryType, dateString, iterationPath) {
  
      var queryString;
  
      if (queryType=== "someType") {
          queryString = {
              "query": "Select [Microsoft.VSTS.Scheduling.RemainingWork] From WorkItems Where [System.WorkItemType] = 'Task' AND [System.State] &lt;&gt; 'Done' AND [System.State] &lt;&gt; 'Closed' AND [System.IterationPath] = '" + iterationPath + "' order by [System.CreatedDate] desc ASOF " + dateString
          };
      }
      else if (queryType === "someOtherType") {
          ....
      }
      else {
          ....                            
      }
  
      return queryString;
  };
  </code></pre>
  
  <p>Then inside the main function:</p>
  
  <pre><code>return TFS_Wit_WebApi.getClient().queryByWiql(queryString)
      .then(function (query) {
          console.log(query);
          ....
      }
  </code></pre>
  
  <p>When the console logs the query result. For those whom it doesn't work for, the query returns an array with 0 elements.</p>
  
  <p><strong>UPDATE:</strong>
  For accounts that the widget doesn't work for. Opening the console in the browser gives this error:</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 400 (Bad Request)
  *******ERROR*******:
  Error: Expecting date-time. The error is caused by &lt;&lt;'20/8/2016'&gt;&gt;.(....)
  </code></pre>