Is there a way to access Timebox Filter for a Report in Rally Custom HTML

64 Views Asked by At

I am working on creating custom HTML widgets in Reports for Rally and I'm accessing data by querying the API like so: https://rally1.rallydev.com/slm/webservice/v2.0/release/?query=((Project.Name%20=%20%22TestProjectName%22)%20and%20(Name%20contains%20%22TestReleaseName%22))&fetch=Name,PlannedVelocity,PlanEstimate I am trying to find a variable, or function in Javascript that would fetch the name, ID, or some other identifier for the currently selected release at the top of my report so I can query it. I have tried searching through rally's SDK and googling but have been unable to find a solution. I am able to find the Projcet ID using PROJECT_OID but needed something similar for the selected release on the release filter so I could query only within said release.

1

There are 1 best solutions below

0
Andrew McGrath On

It sounds like you're running the app on a release filtered page? If so, you can get information about the release filter like so:

var timeboxScope = this.getContext().getTimeboxScope();
if(timeboxScope) {
    var record = timeboxScope.getRecord();
    var name = record.get('Name');
    var startDate = timeboxScope.getType() === 'iteration' ? 
        record.get('StartDate') : record.get('ReleaseStartDate');
}

You can read more about timebox filtering in the SDK docs: https://rally1.rallydev.com/docs/en-us/saas/apps/2.1/doc/index.html#!/guide/timebox_filtering