Domanda

In the rally fetch statement, I give it several objects to acquire for me. But, for some reason, I am not able to access certain properties, even when I used "fetch:true".

My Code:

var query = new rally.sdk.util.Query('ScheduleState != Accepted');

    var queryB = new rally.sdk.util.Query('Release.ReleaseDate > TODAY');

    var queryC = new rally.sdk.util.Query('Release.Name != undefined');

    queryConfig[2] = {
        type:'HierarchicalRequirement',
        key:'UserStories',
        query : query.and(queryB).and(queryC),
        fetch: 'Release,TaskEstimateTotal'

    };

for (var x=0; x < results.UserStories.length; x++) {

      if(results.UserStories[x].Release.Name === release.Name                                                   
      {



       var resources = results.UserStories[x].TaskEstimateTotal;
       totalResources[resultKey][iteration.Name] -= resources;
       totalResources[totalIterationCostKey][iteration.Name] -= resources;
       release[iteration.Name] += resources;
                                                         }


                                  }

results.UserStories[x].Release.Name is always undefined. The TaskEstimateTotal is not. I have tried saying Release != NULL in queryC.

È stato utile?

Soluzione

Specify Name in your fetch as well. The way fetching works can be a little squirrelly in the web services API. Fetching true will return all fields on the root type (HierarchicalRequirement in your case), but will not cascade. If you explicitly include Name though it will cascade down, so both Story.Name and Release.Name will be returned.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top