title: Rally API ignoring the user story letters of the formatted ID in a query
body: <p>I'm searching for user stories in my backlog successfully using arguments like <code>US1, US4</code>. However, when a client tried to query for a <em>feature</em> using the letter <code>F</code>, a user story with the same number was retrieved.</p>
  
  <p>Then I tested with a defect - querying for <code>DE1</code> retrieves <code>US1</code>. But also, querying for any letters <code>XX1</code> will also retrieve the US and the given #. My code for querying is:</p>
  
  <pre><code>public HierarchicalRequirement getUserStoryById(string _formattedID)
      {
          // I created this class with only the properties (bellow) I'm using
          HierarchicalRequirement userStory = null;
  
          Request storyRequest = new Request("hierarchicalrequirement")
          {
              ProjectScopeUp = false,
              ProjectScopeDown = true,
              Fetch = new List&lt;string&gt;() 
              {
                  "Name",
                  "ObjectID",
                  "FormattedID",
                  "LastUpdateDate", 
                  "Owner", 
                  "Children", 
                  "Description", 
                  "RevisionHistory", 
                  "Revisions"
              },
              Query = new Query("FormattedID", Query.Operator.Equals, _formattedID)
          };
  
          try
          {
              QueryResult queryStoryResults = m_rallyApi.Query(storyRequest);
              if (queryStoryResults.Results.Count() &gt; 0)
              {
                  var myStory = queryStoryResults.Results.First();
  
                  //Recursively gets a HierarchicalRequirement and its child by the reference value
                  userStory = GetUserStoryByReference(myStory["_ref"]);
              }
          }
          catch (...){
          }
  
          return userStory;
      }
  </code></pre>
  
  <p>Am I missing something really obvious here? Why I can't query for anything else than User Stories? When I first create the <code>Request</code> object should it be something different from <code>new Request("hierarchicalrequirement")</code> (maybe "defect" or "feature")?</p>
  
  <p>Thank you</p>