title: How to get the revision history of user from Rally using Node js scripting
body: <p>My requirement is to get the exact date/time when a user gets disabled.
  To achieve this, I need to query for the line 'user set to INACTIVE' in the Revision History to find the date the user was switched from enabled to disabled.
  How can I get the revision history using node js ? 
  I tried below code, but its not working as Rally support team mentioned that its older code and i have to try with v2.0. 
  Can somebody help me to achieve my requirement ?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var revisions = story.RevisionHistory.Revisions;
  revisions.sort(byRevisionNumber);
  
  var story_was_blocked = false;
  // it doesn't matter how many revs have been in BLOCKED state, presence of one is sufficient
  for (var rix = 0; rix &lt; revisions.length &amp;&amp; story_was_blocked === false; rix++) {
    var rev = revisions[rix];
    if (rev.Description.indexOf("BLOCKED changed from ") &gt;= 0) {
      story_was_blocked = true;
    }
  }</code></pre>
  </div>
  </div>
  </p>