Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8138653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:33:45+00:00 2026-06-06T11:33:45+00:00

In Rally, I was trying to query for a items in the tree that

  • 0

In Rally, I was trying to query for a items in the tree that contained the word “Feature”. I tried querying for (Parent.Parent.Parent.Parent.Parent.Name contains “Feature”) etc by checking whether any of the parent names have the word “Feature” in them. My approach does not work. Is there a better way to do this? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:33:47+00:00Added an answer on June 6, 2026 at 11:33 am

    As Charles notes, it isn’t possible to traverse a parent hierarchy via a single Rally Query. Ultimately, it will be possible to pull an entire hierarchy and filter on naming and other criteria using the (currently alpha) Lookback API and queries similar to that described in this article:

    Lookback API: Find all leaf node stories under a known parent

    Until then, you can traverse the hierarchy of parents using the AppSDK and recursive calls to the find() method of rallyDataSource. I’ve included a simple that does this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
       <meta name="Name" content="App Example: Parent Name Contains Story Hierarchy"/>
       <title>Parent Name Contains Story Hierarchy</title>
       <script type="text/javascript" src="/apps/1.27/sdk.js"></script>
       <script>
    
         var rallyDataSource;
    
         function parentNameRecursionExample() {
           var parentStoryHierarchy = function(results) {
    
             var storyInfo = "";
             var story = "";
             var parentFormattedID = "";
             for (i=0 ; i < results.stories.length ; i++) {
               story = results.stories[i];
               if (story.Parent != null) {
                   parentName = story.Parent.Name;
    
                   var testContains = "Parent";
                   if (parentName.indexOf(testContains) != -1) {
    
                       storyInfo += story.FormattedID +
                               ', ' + story.Name +
                               ', Parent:' + story.Parent.FormattedID +
                               ': ' + story.Parent.Name + '<br>';
                       aDiv.innerHTML += storyInfo;
                   }
    
                   parentFormattedID = story.Parent.FormattedID;
    
                   var queryConfig = {
                     type : 'HierarchicalRequirement',
                     key : 'stories',
                     fetch: 'FormattedID,Name,Parent',
                     query: '(FormattedID = \"' + parentFormattedID + '\")'
                   };
    
                   rallyDataSource.findAll(queryConfig, parentStoryHierarchy);
               } else {
                   storyInfo += story.FormattedID +
                       ', ' + story.Name +
                       ', Parent: No Parent';
                   aDiv.innerHTML += storyInfo;
    
               }
             }
           };
    
           var queryConfig = { 
              type : 'HierarchicalRequirement',
              key : 'stories',
              fetch: 'FormattedID,Name,Parent',//,
              query: '(FormattedID = \"US130\")'
           };
    
            rallyDataSource = new rally.sdk.data.RallyDataSource('__WORKSPACE_OID__',
                                                      '__PROJECT_OID__',
                                                       '__PROJECT_SCOPING_UP__', 
                                                      '__PROJECT_SCOPING_DOWN__'); 
           rallyDataSource.findAll(queryConfig, parentStoryHierarchy);
         }
    
         rally.addOnLoad(parentNameRecursionExample);
      </script>
    </head>
    <body>
      <div id="aDiv"></div>
    </body>
    </html>
    

    It traverses a Story Hierarchy that looks like this:

    Story Hierarchy

    And filters for stories containing “Parent” in the Story Name, producing the following output:

    Filtered Story Hierarchy output from App

    Understood the sample is a rough cut and not very pretty, not as elegant or easy as a single query, but it illustrates how to traverse the tree and filter for the results you are looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying this query: //connect; $site = mysql_real_escape_string($_GET['site']); $data = mysql_query(SELECT * FROM Items
I'm trying to construct a query that will include a column indicating whether or
My laptop is rally showing it's age, and last night after trying out the
Really, really trying to find a plugin that gives adds functionality to the image-resize
I have a rally.sdk.ui.basic.Dropdown menu in a Rally App that I would like to
I am trying to query against an IList<string> property on one of my domain
I have question about the sql query. I am trying to make the query
I'm working on a sheet that accesses a legacy data source via MS Query.
I'm trying to collect statistic data in one SQL query for the convenience of
Here's what I'm trying to do. I have an extremely large list of items.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.