Rally Software

 View Only
  • 1.  Getting Initiatives from filtered Features or Array size limits in Rally queries

    Posted Sep 04, 2018 10:51 PM

    In Rally (Agile Central), I have written a custom app where I want to pull back PortfolioItem/Initiatives tied to a list of PortfolioItem/Capabilities (where the Capabilities are the children).  I create an array of  Capability _refs and use the containsany operator for the query filter.

     

    It works fine until the array hits more than 35 items.  It fails but I don't get a message why it fails.  I assume there's some kind of limit.  I'm essentially trying to pull all Initiatives whose Features (under Capabilities) are tied to a few Releases.  Right now, I get all of those Feature and the refs to the parent capabilities to get the Initiatives but perhaps there's an easier way?

     

    Here's my code to pull down Initiatives...

    Ext.create('Rally.data.wsapi.Store', {
    models: ['PortfolioItem/Initiative'],
    autoLoad: true,
    pageSize: 10000,
    filters: [
    { property: 'Children', operator: 'containsany', value: capabilities } //only works if the capabilities array < 36 items
    ],
    fetch: ['FormattedID', 'Name', 'PreliminaryEstimate',
    'PreliminaryEstimateValue', 'Project', 'Parent', 'Tags', 'Tag', 'Parent'],
    hydrate: ['Project', 'Tag', 'Parent'],
    sorters: [{ property: 'FormattedID', direction: 'ASC' }],
    listeners: {
    scope: this,
    load: function (store, initiatives, success, eOpts) {
    console.log('We got initiatives back - Woohoo!');
    deferred.resolve(featuresAndReleases);
    }
    }
    });

     

    Appreciate any thoughts or ways to get past this.



  • 2.  Re: Getting Initiatives from filtered Features or Array size limits in Rally queries

    Posted Sep 05, 2018 06:12 AM

    morky01 Any thoughts on this one?

     

    Thank you!

     

    Michael



  • 3.  Re: Getting Initiatives from filtered Features or Array size limits in Rally queries
    Best Answer

    Posted Sep 05, 2018 08:09 AM

    Hmm, that's a puzzler.  It's possible that 35/36 is right on the threshold of creating a request too large.  It would be interesting to know if you're getting any console errors, or if you inspect the network traffic in your dev tools- do you see an error being returned from WSAPI?

     

    The other way you might be able to do this is to just fetch the Initiative data as part of loading the capabilities.  It looks like you already understand how the fetch cascades across object associations.  This won't work if you need parent of the parent data though, as hierarchy is limited.



  • 4.  Re: Getting Initiatives from filtered Features or Array size limits in Rally queries

    Posted Sep 06, 2018 09:43 PM

    Kyle - you are always on top of things.  Hope all is well.  Yes.  I'm trying to link Feature Releases to Initiatives (assuming standard SAFe hierarchy).  I tried to get Initiatives with DirectChildrenCount > 0 but I don't seem to be able to hydrate the children capabilities.  Even the _refs would help.



  • 5.  Re: Getting Initiatives from filtered Features or Array size limits in Rally queries

    Posted Sep 24, 2018 12:45 PM

    Oh, hey Chris, I didn't realize it was you!  Did you get any farther with this?  It's hard to speculate about what's going on without the complete code and/or without knowing what's showing up in your console/network traffic.

     

    I also had another thought- you can directly query for initiatives where their grand children are in a specific release:

         filters: [{ property: 'Children.Children.Release.Name', operator: '=', value: 'My Release' }]



  • 6.  Re: Getting Initiatives from filtered Features or Array size limits in Rally queries

    Posted Sep 24, 2018 02:37 PM

    Hey Kyle,

     

    Thanks for reaching back out.  I got it working just walking up from Features to Capabilities to Initiatives.  I just kept a hash of each so that I could link Features to Initiatives (2 hops up from lowest portfolio item).  The code is messier than I’d like but it works and I think I’m good for now.

     

    Thanks!

    Chris